Skip to main content

HTTP Request from scratch 101

Project description

XRZZ HTTP Request

Description

 Just a simple module for HTTP Request 

 supports : {

 	 1: GET,
 	 2: POST 

 }

Todo

Accept Cookies
Persistent Connection to server
Auto Encode url 
proxy support
Auto Redirect facility
PUT; PATCH; TRACE; CONNECT
optimization needed

Supports

GET, POST	

Installation

till now it doesn't need any external modules

pip install xrzz

Usage

import xrzz

a = xrzz.http("get", 
		url="https://httpbin.org/get", 
		headers={"user-agent": "Xrzz/v1"},
		tls=True)
print(a.body())


# output (Bytes)

		b'{\n"args": {},\n"headers": {\n"Host": "httpbin.org",\n "User-Agent": "Xrzz/v1", \n
		"X-Amzn-Trace-Id": "Root=1-606b416e-79346cf934ed2d6f4aa2cbf7"\n  },\n  "origin": "45.103.157.9", \n 
		"url": "https://httpbin.org/get"\n}\n'

		Usually it returns in bytes 

# output (decoded)

		{
		  "args": {},
		  "headers": {
		    "Host": "httpbin.org",
		    "User-Agent": "Xrzz/v1",
		    "X-Amzn-Trace-Id": "Root=1-606b416e-79346cf934ed2d6f4aa2cbf7"
		  },
		  "origin": "45.103.157.9",
		  "url": "https://httpbin.org/get"
		}


print(a.head() 

# output (dict)

		{
			'Date': 'Mon, 05 Apr 2021 17:06:13 GMT', 
			'Content-Type': 'application/json', 
			'Content-Length': '242', 
			'Connection': 'close', 
			'Server': 'gunicorn/19.9.0', 
			'Access-Control-Allow-Origin': '*', 
			'Access-Control-Allow-Credentials': 'true'
		}

Whats new

POST METHOD 

Version

 v0.1.3

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

xrzz-0.1.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

xrzz-0.1.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file xrzz-0.1.5.tar.gz.

File metadata

  • Download URL: xrzz-0.1.5.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for xrzz-0.1.5.tar.gz
Algorithm Hash digest
SHA256 89fb772e313d1d8ca456f4f056e9486ff93197b5bfb28bf95f8103e8bc0de98b
MD5 469dc04c990c11479bc7ee9dcc38eb28
BLAKE2b-256 037b08fc4a17e1447c418cb604717c13fdd5c048223989bfd456c132ab3654a5

See more details on using hashes here.

File details

Details for the file xrzz-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: xrzz-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for xrzz-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3e4a9277f65ca1614d3fb2398dc6e1fdc17340690357de75cb77106ae8c3fa08
MD5 7e66133f2081ba75d7d8976f17fd577f
BLAKE2b-256 eebcf824220910b0dbc6a807621519382ff241c70549785dd09ab31f2ba77c4d

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