Skip to content

Simple Python Requests library wrapper to simplify usage of proxies

License

Notifications You must be signed in to change notification settings

ericholm/sbhs_request

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetRequests Library

NetRequests is a HTTP library for SBHS students. It routes your http requests through the school proxy, using user supplied credentials.

Installation

Simply download the zip, or clone the repo. Import all from NetRequest within your python project.

Usage

Simply create an instance of Proxy by passing in either your username and password, or the path to a file containing them on the first two lines.

from NetRequest import *

credentials = Proxy('proxyUsername', 'proxyPassword')
credentialsFromFile = Proxy("~/.netrequest")

Use this proxy instance with the NetRequest class to perform requests.

net = NetRequest(Proxy("proxyUsername", "proxyPassword"))

// Performs HTTP get on url
response = net.get("https://www.google.com/") 
print(response)

print('\r\n')

// Post some data
response = net.post("https://httpbin.org/post") 
print(response)

Authors & License

Written by Eric Holmstrom and Dawei Wu. See LICENSE for more details.

About

Simple Python Requests library wrapper to simplify usage of proxies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages