Skip to main content

http-raw

PyPI version Python version

A library for better processing of raw data✌️

Install

pip install http-raw

Use

import httpraw

raw = '''POST /post HTTP/1.1
Host: httpbin.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 19

key1=val1&key2=val2
'''

# resp is requests Response
resp = httpraw.request(raw=raw)
print(resp.status_code)
print(resp.text)

proxy = {
    'socks5': '127.0.0.1:1086'
}
resp = httpraw.request(raw=raw, proxy=proxy, timeout=5, ssl=True, verify=True)

# use api
url = 'http://httpbin.org/post'
headers = '''
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: close
Content-Type: application/x-www-form-urlencoded
'''
data = 'key1=val1&key2=val2'
resp = httpraw.post(url, headers=headers, data=data)

Dev

pipenv install --dev

Metadata

Release files for http-raw 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for http-raw 0.2.1
File Size Uploaded Provenance Actions
http-raw-0.2.1.tar.gz 3.5 kB Without provenance Details for http-raw-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for http-raw 0.2.1
File Interpreter ABI Platform Actions
http_raw-0.2.1-py3-none-any.whl Python 3 none any Details for http_raw-0.2.1-py3-none-any.whl

Total release size: 19.6 kB

Release files / http-raw-0.2.1.tar.gz

Download URL http-raw-0.2.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
82d4a261c5de23acefee41600aad3731d5c2156afcdde4506ddb86674829d5c8
BLAKE2b-256 checksum
How to use checksums
cdf372bc202e2359e73e28091446daf541511e8fb892ef21e1e19c60f19f9e8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Release files / http_raw-0.2.1-py3-none-any.whl

Download URL http_raw-0.2.1-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0973d949dc8814e0bb63d423607f27eb3413e5a6a461e32feada409be4beefa1
BLAKE2b-256 checksum
How to use checksums
8d6b1b36719580c72e688f2cd6fef9eb2edef430b55bfd6cbad15aa37b85e271
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Security for http-raw 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page