http3-0.0.10: HTTP/3 library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.HQ.Client

Description

A client library for HTTP/0.9.

Synopsis

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 client. For HQ, authority is not used and an server's IP address is used in Request.

Constructors

ClientConfig 

data Config 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".

type Authority = String #

Authority.

HQ client

type Client a = SendRequest -> Aux -> IO a #

Client type.

Request

data Request #

Request from client.

Instances

Instances details
Show Request 
Instance details

Defined in Network.HTTP2.Client.Types

Creating request

requestNoBody :: Method -> Path -> RequestHeaders -> Request #

Creating request without body.

Response

data Response #

Response from server.

Instances

Instances details
Show Response 
Instance details

Defined in Network.HTTP2.Client.Types

Accessing response

getResponseBodyChunk :: Response -> IO ByteString #

Reading a chunk of the response body. An empty ByteString returned when finished.