Idris2Doc : Network.HTTP.Client

Network.HTTP.Client

(source)

Definitions

recordHttpClient : Type->Type
Totality: possibly not terminating due to call to $resolved25483
Visibility: public export
Constructor: 
MkHttpClient : IORefCookieJar->Bool->Bool->PoolManagere->HttpCliente

Projections:
.cookie_jar : HttpCliente->IORefCookieJar
.follow_redirect : HttpCliente->Bool
.pool_manager : HttpCliente->PoolManagere
.store_cookie : HttpCliente->Bool
.cookie_jar : HttpCliente->IORefCookieJar
Visibility: public export
cookie_jar : HttpCliente->IORefCookieJar
Visibility: public export
.store_cookie : HttpCliente->Bool
Visibility: public export
Visibility: public export
.follow_redirect : HttpCliente->Bool
Visibility: public export
follow_redirect : HttpCliente->Bool
Visibility: public export
.pool_manager : HttpCliente->PoolManagere
Visibility: public export
pool_manager : HttpCliente->PoolManagere
Visibility: public export
close : HasIOio=>HttpCliente->io ()
  Close all existing connections in the HTTP client.
A closed client can be reused again.

Visibility: export
new_client : HasIOio=> (String->CertificateCheckIO) -> (max_total_connection : Nat) -> {auto0_ : NonZeromax_total_connection} -> (max_per_site_connection : Nat) -> {auto0_ : NonZeromax_per_site_connection} -> {auto0_ : LTEmax_per_site_connectionmax_total_connection} ->Bool->Bool->io (HttpCliente)
  Creates a new HTTP client.
Arguments:

@ cert_checker the function used to verify the website's TLS certificate.
`certificate_check` and `certificate_ignore_check` are provided in `Network.TLS`.
@ max_total_connection the maximum alive connections (per protocol) allowed
@ max_per_site_connection the maximum alive connections (per protocol) per site allowed
@ store_cookie whether the client should store received cookies
@ follow_redirect whether the client should follow redirects according to response status codes

Visibility: export
new_client_default : HasIOio=>io (HttpCliente)
  Create a new HTTP client with default configuration.
This would also verify the website's TLS certificate with the system's trusted CAs.
max_total_connection = 25
max_per_site_connection = 5
store_cookie = True
follow_redirect = True

Visibility: export
request' : MonadError (HttpErrore) m=>HasIOm=>HttpCliente->Method->URL->List (String, String) ->Nat->Stream (OfBits8) (EitherTeIO) () ->m (HttpResponse, Stream (OfBits8) m ())
  Send a HTTP request, returns a `HttpResponse` containing the status code and headers,
and also a stream of the content body from the response.
Arguments:

@ client the HTTP client
@ method the HTTP method, e.g. GET / POST
@ url the URL to of the website to be connected to
@ headers the HTTP headers, represented as a list of (key, value)
@ length the length of the content to be sent
@ input the stream of bytes to be sent, which should be at least `length` bytes

Visibility: export
interfaceBytestream : Type->Type
Parameters: a
Methods:
to_stream : Monadm=>a-> (Nat, Stream (OfBits8) m ())

Implementations:
Bytestream ()
Bytestream (ListBits8)
BytestreamString
to_stream : Bytestreama=>Monadm=>a-> (Nat, Stream (OfBits8) m ())
Visibility: public export
request : MonadError (HttpErrore) m=>HasIOm=>Bytestreama=>HttpCliente->Method->URL->List (String, String) ->a->m (HttpResponse, Stream (OfBits8) m ())
  Send a HTTP request, returns a `HttpResponse` containing the status code and headers,
and also a stream of the content body from the response.
Arguments:

@ client the HTTP client
@ method the HTTP method, e.g. GET / POST
@ url the URL to of the website to be connected to
@ headers the HTTP headers, represented as a list of (key, value)
@ payload the content payload of the request. Use () for empty content.

Visibility: export