Skip to content

Instantly share code, notes, and snippets.

@yzguy
Created May 7, 2016 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yzguy/140a4b0064ea7a3ede2ca1f1348ab4bb to your computer and use it in GitHub Desktop.
Save yzguy/140a4b0064ea7a3ede2ca1f1348ab4bb to your computer and use it in GitHub Desktop.
import requests
# HTTP(S) proxy
# Through Fiddler
proxies = {
"http": "http://localhost:8080",
"https": "http://localhost:8080"
}
# Endpoint to make HTTP request to
endpoint = ""
# Headers to include with request
headers = {
}
# Parameters to send with request
payload = {
}
# Basic Auth Credentials
username = ''
password = ''
# Make HTTP Request and print response
r = requests.get(endpoint, headers=headers, data=payload, proxies=proxies, verify=False, auth=(username, password))
print r.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment