Skip to main content

HTTP communication through raw sockets using aiohttp for RFC compliance testing

Project description

aiohttp-raw

PyPI version Downloads PyPI - Python Version

Use aiohttp to send HTTP raw sockets (To Test RFC Compliance)

Logo

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


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)

Uploaded Source

Built Distribution

aiohttp_raw-0.1.1-py2.py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page