Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A client library for HTTP/0.9.
Synopsis
- run :: Connection -> ClientConfig -> Config -> Client a -> IO a
- data ClientConfig = ClientConfig {}
- data Config = Config {}
- allocSimpleConfig :: IO Config
- freeSimpleConfig :: Config -> IO ()
- type Scheme = ByteString
- type Authority = String
- type Client a = SendRequest -> Aux -> IO a
- data Request
- requestNoBody :: Method -> Path -> RequestHeaders -> Request
- data Response
- getResponseBodyChunk :: Response -> IO ByteString
Runner
run :: Connection -> ClientConfig -> Config -> Client a -> IO a Source #
Running an HQ client.
Runner arguments
data ClientConfig Source #
Configuration for HTTP/3 or HQ.
allocSimpleConfig :: IO Config Source #
Allocating a simple configuration with a handle-based position reader and a locally allocated timeout manager.
freeSimpleConfig :: Config -> IO () Source #
Freeing a simple configration.
type Scheme = ByteString #
"http" or "https".
HQ client
type Client a = SendRequest -> Aux -> IO a #
Client type.
Request
Request from client.
Creating request
requestNoBody :: Method -> Path -> RequestHeaders -> Request #
Creating request without body.
Response
Response from server.
Accessing response
getResponseBodyChunk :: Response -> IO ByteString #
Reading a chunk of the response body.
An empty ByteString
returned when finished.