Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data Exception
- data HttpException
- = ChunkTooLarge
- | ChunkedBodyEndOfInput
- | NonchunkedBodyEndOfInput
- | ContentLengthDuplicated
- | ContentLengthMalformed
- | ContentLengthTooLarge
- | ExpectedCrlfAfterChunk
- | ExpectedCrlfAfterChunkLength
- | ExpectedCrlfBeforeChunkLength
- | HeadersMalformed
- | HeadersEndOfInput
- | HeadersTooLarge
- | ImplementationMistake
- | NonNumericChunkLength
- | PipelinedResponses
- | TransferEncodingUnrecognized
- | TransferEncodingDuplicated
- exchange :: Resource -> Bodied Request -> M (Either Exception (Bodied Response))
Documentation
An exception that occurs during an HTTP exchange.
Http !HttpException | The response was not a valid HTTP response |
Send !SendException | Transport exception while sending. When backed by stream sockets,
exceptions like |
Receive !ReceiveException | Transport exception while receiving. Depending on the backend, this may or may not include an end-of-input exception. For stream sockets, end-of-input is not presented as an exception. It is presented as a zero-length result. |
Instances
Exception Exception Source # | |
Defined in Exchange toException :: Exception -> SomeException # fromException :: SomeException -> Maybe Exception # displayException :: Exception -> String # | |
Show Exception Source # | |
data HttpException #
Instances
Exception HttpException | |
Defined in Http.Exchange.Types | |
Show HttpException | |
Defined in Http.Exchange.Types showsPrec :: Int -> HttpException -> ShowS # show :: HttpException -> String # showList :: [HttpException] -> ShowS # |
exchange :: Resource -> Bodied Request -> M (Either Exception (Bodied Response)) Source #
Send an HTTP request and await a response. This function takes
responsibility for encoding the request and decoding the response.
It deals with the Transfer-Encoding
of the response and supports
both chunked and nonchunked responses.