Attention

This is the documentation for HARP Proxy, actually published as an early preview. Both the software and documentation are a work in progress, and although we already use it on various production servers, they may contain inaccuracies, typographical errors, huge mistakes and empty pages. We work hard to eradicate all mistakes and implement stuff, but it is a long and tedious process. We appreciate your patience and understanding. Of course, any help will be greatly appreciated.

harp.http.typing.bridges

class HttpRequestBridge[source]

Bases: Protocol

The HttpRequestBridge protocol defines the methods required by the HttpRequest object for it to attach to a real implementation, such as WSGI, ASGI, …

__init__(*args, **kwargs)
get_headers()[source]
Return type:

CIMultiDict

get_method()[source]
Return type:

str

get_path()[source]
Return type:

str

get_query()[source]
Return type:

MultiDict

get_server_ipaddr()[source]
Return type:

str

get_server_port()[source]
Return type:

int

async read()[source]
Return type:

bytes

async stream()[source]
Return type:

AsyncIterator[bytes]

class HttpResponseBridge[source]

Bases: Protocol

The HttpResponseBridge protocol defines the necessary methods to actually send an HttpResponse through a real channel.

__init__(*args, **kwargs)