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.0.tar.gz
(8.1 kB
view hashes)
Built Distribution
Close
Hashes for aiohttp_raw-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb2047b897068020c64cd231d63fe20f965002cfeb3319ac38f9bfadc00d608d |
|
MD5 | 2bf1ea718f3766040edd8389ae88ccdb |
|
BLAKE2b-256 | 9fd163bfb381d848bbd1bf9ec11ecce29a932332a8c92b1c768ab28b8219175c |