- hRawRequestBody :: BodyM Request m => m ByteString
- hRawResponseBody :: BodyM Response m => m ByteString
- hRawBody :: forall m d. (MonadIO m, HandleM m, HttpM d m) => d -> m ByteString
- hRequestBodyText :: (BodyM Request m, HttpM Request m) => String -> m Text
- hResponseBodyText :: (BodyM Response m, HttpM Response m) => String -> m Text
- hBodyText :: forall m dir. (BodyM dir m, HttpM dir m) => dir -> String -> m Text
- hRequestBodyStringUTF8 :: BodyM Request m => m String
- hResponseBodyStringUTF8 :: BodyM Response m => m String
- hBodyStringUTF8 :: BodyM dir m => dir -> m String
- hRequestParameters :: (BodyM Request m, HttpM Request m) => String -> m Parameters
- hResponseParameters :: (BodyM Response m, HttpM Response m) => String -> m Parameters
- hParameters :: (BodyM d m, HttpM d m) => d -> String -> m Parameters
Documentation
hRawRequestBody :: BodyM Request m => m ByteStringSource
hRawResponseBody :: BodyM Response m => m ByteStringSource
hRawBody :: forall m d. (MonadIO m, HandleM m, HttpM d m) => d -> m ByteStringSource
First (possibly naive) handler to retreive the client request or server
response body as a raw lazy ByteString
. This probably does not handle all
the quirks that the HTTP protocol specifies, but it does the job for now. When
a contentLength
header field is available only this fixed number of bytes
will read from the socket. When neither the keepAlive
and contentLength
header fields are available the entire payload of the request will be read from
the socket. The function is parametrized with a the direction of the HTTP
message, client request or server response.
hBodyText :: forall m dir. (BodyM dir m, HttpM dir m) => dir -> String -> m TextSource
Like the hRawBody
but is will handle proper decoding based on the charset
part of the contentType
header line. When a valid encoding is found in the
Http
message it will be decoded with using the encodings package. The default
encoding supplied as the function's argument can be used to specify what
encoding to use in the absence of a proper encoding in the HTTP message itself.
hRequestBodyStringUTF8 :: BodyM Request m => m StringSource
Like hBodyStringUTF8
but specifically for Http
Request
s.
hResponseBodyStringUTF8 :: BodyM Response m => m StringSource
Like hBodyStringUTF8
but specifically for Http
Response
s.
hBodyStringUTF8 :: BodyM dir m => dir -> m StringSource
hRequestParameters :: (BodyM Request m, HttpM Request m) => String -> m ParametersSource
Like hParameters
but specifically for HTTP
Request
s.
hResponseParameters :: (BodyM Response m, HttpM Response m) => String -> m ParametersSource
Like hParameters
but specifically for HTTP
Response
s.
hParameters :: (BodyM d m, HttpM d m) => d -> String -> m ParametersSource