blackbull.client.client¶
blackbull.client.client
¶
ALPN-dispatching front door.
Client
¶
ALPN-negotiating client: HTTP2Client on h2, else HTTP1Client.
With ssl=None (the default) there is no ALPN to read, so the answer is
always HTTP/1.1. WebSocket is never dispatched to; name its client.
Use as an async context manager::
async with Client('localhost', 8000) as c:
res = await c.request(HTTPMethod.GET, '/')