Safe Haskell | None |
---|
- type ResponseHeader = MessageHeader Status
- readResponse :: Method -> Connection -> IO (ResponseHeader, BodyReader)
- readResponseWithLimit :: Limit -> Method -> Connection -> IO (ResponseHeader, BodyReader)
- parseStatusLine :: ByteString -> Maybe Status
- determineResponseBodyType :: Method -> Status -> [Header] -> BodyType
Documentation
readResponse :: Method -> Connection -> IO (ResponseHeader, BodyReader)Source
Same as readResponseWithLimit
with a Limit
of
defaultHeaderSizeLimit
.
readResponseWithLimit :: Limit -> Method -> Connection -> IO (ResponseHeader, BodyReader)Source
Read response from provided connection.
Throws:
-
InvalidStatusLine
if request-line is malformed. -
HeaderTooLarge
if the header size exceeds the specifiedLimit
. -
InvalidHeader
if header is malformed.
parseStatusLine :: ByteString -> Maybe StatusSource
Parse status-line (see RFC 2616, Section 6.1).
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).