Portability | non-portable (not tested) |
---|---|
Stability | experimental |
Maintainer | Sigbjorn Finne <sigbjorn.finne@gmail.com> |
A HandleStream version of Network.HTTP.Stream's public offerings.
- simpleHTTP :: HStream ty => Request ty -> IO (Result (Response ty))
- simpleHTTP_ :: HStream ty => HandleStream ty -> Request ty -> IO (Result (Response ty))
- sendHTTP :: HStream ty => HandleStream ty -> Request ty -> IO (Result (Response ty))
- receiveHTTP :: HStream bufTy => HandleStream bufTy -> IO (Result (Request bufTy))
- respondHTTP :: HStream ty => HandleStream ty -> Response ty -> IO ()
- simpleHTTP_debug :: HStream ty => FilePath -> Request ty -> IO (Result (Response ty))
Documentation
simpleHTTP :: HStream ty => Request ty -> IO (Result (Response ty))Source
Simple way to get a resource across a non-persistant connection. Headers that may be altered: Host Altered only if no Host header is supplied, HTTP/1.1 requires a Host header. Connection Where no allowance is made for persistant connections the Connection header will be set to close
simpleHTTP_ :: HStream ty => HandleStream ty -> Request ty -> IO (Result (Response ty))Source
Like simpleHTTP
, but acting on an already opened stream.
receiveHTTP :: HStream bufTy => HandleStream bufTy -> IO (Result (Request bufTy))Source
Receive and parse a HTTP request from the given Stream. Should be used for server side interactions.
respondHTTP :: HStream ty => HandleStream ty -> Response ty -> IO ()Source
Very simple function, send a HTTP response over the given stream. This could be improved on to use different transfer types.