Portabilitynon-portable (not tested)
MaintainerSigbjorn Finne <>



A HandleStream version of Network.HTTP.Stream's public offerings.



simpleHTTP :: HStream ty => HTTPRequest ty -> IO (Result (HTTPResponse 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 -> HTTPRequest ty -> IO (Result (HTTPResponse ty))Source

Like simpleHTTP, but acting on an already opened stream.

receiveHTTP :: HStream bufTy => HandleStream bufTy -> IO (Result (HTTPRequest bufTy))Source

Receive and parse a HTTP request from the given Stream. Should be used for server side interactions.

respondHTTP :: HStream ty => HandleStream ty -> HTTPResponse ty -> IO ()Source

Very simple function, send a HTTP response over the given stream. This could be improved on to use different transfer types.