The function `binascii.b2a_base64()` returns a `bytes`, but here needs a
string. Otherwise, the value of `Sec-WebSocket-Key` in the headers will be
`b'<BASE64-ENCODED_RANDOM_VALUE>'`.
Signed-off-by: AuroraTea <1352685369@qq.com>
Mostly small cleanups to put each top-level import on its own line. But
explicitly disable the lint for examples/tests which insert the current
directory into the path before importing.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Most of these look like they were used for print debugging and then kept in
when the print statements were removed or commented.
Some look like missing or incomplete functionality, these have been marked
with comments where possible.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
- Fix binary data `Content-type` header and data `Content-Length`
calculation.
- Fix query length when data is included.
- Fix `json` and `text` methods of `ClientResponse` to read
`Content-Length` size
Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
Implement `aiohttp` with `ClientSession`, websockets and `SSLContext`
support.
Only client is implemented and API is mostly compatible with CPython
`aiohttp`.
Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>