futurefinity.client – FutureFinity HTTP Client

exception futurefinity.client.BadResponse[source]

FutureFinity Client Bad Response Error.

This Error is raised when futurefinity received a bad response from the server.

exception futurefinity.client.ClientError[source]

FutureFinity Client Error.

All Errors from FutureFinity Client Side are based on this class.

class futurefinity.client.HTTPClient(*args, http_version=11, allow_keep_alive: bool=True, loop: typing.Union=None, context: typing.Union=None, **kwargs)[source]

FutureFinity HTTPClient Class.

This is the HTTPClient Implementation of FutureFinity.

fetch(method: str, url: str, headers: typing.Union=None, cookies: typing.Union=None, link_args: typing.Union=None, body: typing.Union=None)[source]

Fetch the request.

get(url: str, headers: typing.Union=None, cookies: typing.Union=None, link_args: typing.Union=None)[source]

This is a friendly wrapper of client.HTTPClient.fetch for GET request.

post(url: str, headers: typing.Union=None, cookies: typing.Union=None, link_args: typing.Union=None, body_args: typing.Union=None, files: typing.Union=None)[source]

This is a friendly wrapper of client.HTTPClient.fetch for POST request.

class futurefinity.client.HTTPClientConnectionController(host: str, port: int, *args, allow_keep_alive: bool=True, http_version: int=11, loop: typing.Union=None, context: ssl.SSLContext=None, **kwargs)[source]

HTTP Client Connection Controller Class.

THis is a subclass of protocol.BaseHTTPConnectionController.

This is used to control a HTTP Connection.

close_stream_and_connection()[source]

Close the Stream and the Connection.

fetch(method: str, path: str, headers: futurefinity.protocol.HTTPHeaders, body: bytes)[source]

Fetch the request.

get_stream_and_connection_ready()[source]

Prepare the Stream and the Connection for new request.

exception futurefinity.client.RequestTimeoutError[source]

FutureFinity Client Timeout Error.

This Error is raised when the server has no response until the timeout.

exception futurefinity.client.ResponseEntityTooLarge[source]

FutureFinity Client Response Entity Too Large Error.

This Error is raised when futurefinity received a response that entity larger than the largest allowed size of entity from the server.