Skip to main content

Send the HTTP/ MQTT/ WEBSOCKET Request

Project description

TP-Requests


Installation

From PyPI:

pip install TP-Requests

From Source:

git clone https://github.com/truocphan/TP-Requests.git --branch <Branch/Tag>
cd TP-Requests
python setup.py build
python setup.py install

Basic Usage

from TP_Requests.http import TP_HTTP_REQUEST

rawRequest = """GET /v1/promo/extension HTTP/2
Host: d2y7f743exec8w.cloudfront.net
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.97 Safari/537.36
Connection: close
Cache-Control: max-age=0

"""

httpRequest = TP_HTTP_REQUEST(rawRequest)

httpRequest.RequestParser.request_method = "POST"

print(httpRequest.sendRequest(Host="d2y7f743exec8w.cloudfront.net", Port=443, Scheme="https", proxy_server={"host":"127.0.0.1","port":8080}).dumps(indent=4))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

TP_Requests-2024.12.22-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

TP_Requests-2024.12.22-py2-none-any.whl (4.5 kB view details)

Uploaded Python 2

File details

Details for the file TP_Requests-2024.12.22-py3-none-any.whl.

File metadata

File hashes

Hashes for TP_Requests-2024.12.22-py3-none-any.whl
Algorithm Hash digest
SHA256 5fdf095339d32eaacde3d8b91617bd3841654d86ca362948528d7c5b65392c20
MD5 8b604012c2c46d739cc8329f9001e0f4
BLAKE2b-256 761da559103cadbbd28679e675c7e1d9e5621a4c555ed5130c22873db9640977

See more details on using hashes here.

File details

Details for the file TP_Requests-2024.12.22-py2-none-any.whl.

File metadata

File hashes

Hashes for TP_Requests-2024.12.22-py2-none-any.whl
Algorithm Hash digest
SHA256 385e0a2c446207038800c6260a1b7fc777e4fdc26bc126f4ea6fd6dc59a869ac
MD5 d69d3933738ff56175b799712b307c8b
BLAKE2b-256 5a0c6dfeb1e45f626a5656265973e442d63bd05cfc52b54c5a558f9f2ca95e8d

See more details on using hashes here.

Supported by

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