Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Request = RequestF RequestBody Builder
- data RequestF body path = Request {
- requestPath :: path
- requestQueryString :: Seq QueryItem
- requestBody :: Maybe (body, MediaType)
- requestAccept :: Seq MediaType
- requestHeaders :: Seq Header
- requestHttpVersion :: HttpVersion
- requestMethod :: Method
- data RequestBody
- defaultRequest :: Request
- addHeader :: ToHttpApiData a => HeaderName -> a -> Request -> Request
- appendToPath :: Builder -> Request -> Request
- appendToQueryString :: Text -> Maybe ByteString -> Request -> Request
- encodeQueryParamValue :: ToHttpApiData a => a -> ByteString
- setRequestBody :: RequestBody -> MediaType -> Request -> Request
- setRequestBodyLBS :: ByteString -> MediaType -> Request -> Request
Documentation
data RequestF body path Source #
Request | |
|
Instances
data RequestBody Source #
The request body. R replica of the http-client
RequestBody
.
Instances
Modifiers
addHeader :: ToHttpApiData a => HeaderName -> a -> Request -> Request Source #
Add header to the request being constructed.
appendToPath :: Builder -> Request -> Request Source #
Append extra path to the request being constructed.
Warning: This function assumes that the path fragment is already URL-encoded.
:: Text | query param name |
-> Maybe ByteString | query param value |
-> Request | |
-> Request |
Append a query parameter to the request being constructed.
encodeQueryParamValue :: ToHttpApiData a => a -> ByteString Source #
Encode a query parameter value.
setRequestBody :: RequestBody -> MediaType -> Request -> Request Source #
Set body and media type of the request being constructed.
Since: 0.12
setRequestBodyLBS :: ByteString -> MediaType -> Request -> Request Source #
Set body and media type of the request being constructed.
The body is set to the given bytestring using the RequestBodyLBS
constructor.
Since: 0.12