http-kit-0.2.0: A low-level HTTP library

Safe HaskellNone

Network.HTTP.Toolkit.Response

Synopsis

Documentation

data Response a Source

Constructors

Response 

Instances

Functor Response 
Eq a => Eq (Response a) 
Show a => Show (Response a) 

readResponseWithLimit :: Limit -> Method -> Connection -> IO (Response BodyReader)Source

Read response from provided connection.

The corresponding request Method has to be specified so that the body length can be determined (see RFC 2616, Section 4.4).

Throws:

sendResponse :: (ByteString -> IO ()) -> Response BodyReader -> IO ()Source

Send an HTTP response.

formatStatusLine :: Status -> ByteStringSource

Format status-line.

determineResponseBodyType :: Method -> Status -> [Header] -> BodyTypeSource

Determine the message BodyType from a given Method, Status, and list of message headers (as of RFC 2616, Section 4.4).