Skip to content

Instantly share code, notes, and snippets.

@sigmavirus24
Created August 22, 2012 15:11
Show Gist options
  • Save sigmavirus24/3426624 to your computer and use it in GitHub Desktop.
Save sigmavirus24/3426624 to your computer and use it in GitHub Desktop.
Test for kennethreitz/requests#804
from requests import Session
class Test(Session):
def __init__(self):
super(Test, self).__init__(params={'alt': 'json'})
self.get_url = 'http://httpbin.org/get'
t = Test()
r1 = t.get(t.get_url)
r2 = t.get(t.get_url, params={'new': '1'})
r3 = t.get(t.get_url, params={'alt': 'xml'})
r4 = t.get(t.get_url, timeout=10)
r5 = t.get(t.get_url, verify=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment