HTTP communication through raw sockets using aiohttp for RFC compliance testing
Project description
aiohttp-raw
Use aiohttp to send HTTP raw sockets (To Test RFC Compliance)
Usage
import asyncio
import aiohttp_raw
async def main():
req = b"GET /get HTTP/1.1\r\nHost: httpbin.org\r\n\r\n"
async with aiohttp_raw.ClientSession() as session:
async with session.raw("http://httpbin.org/get", data=req) as response:
print(await response.text())
loop = asyncio.new_event_loop()
loop.run_until_complete(main())
Installation
Prerequisites
- Python 3.8+
pip3 install aiohttp-raw
# speedups
pip install aiohttp[speedups]
# socks
pip install aiohttp[socks]
# speedups-socks
pip install aiohttp[speedups-socks]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiohttp-raw-0.1.1.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for aiohttp_raw-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b94c2f4cdb795dfc68bf2c100c55b68e1252a2e810d6364469371c807273bc9 |
|
MD5 | 8e79fdb293146904bcf537bab3f1202f |
|
BLAKE2b-256 | 92e910bf10172ccfe7e76e36853fdcd7528893a1d74550931298aca0dbb2779f |