Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated hoover to use python requests instead of httplib2 #7

Merged
merged 4 commits into from Feb 23, 2013
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

added params

  • Loading branch information
gingerlime committed Feb 22, 2013
commit 996b9167303abaf2b32e38c69c801c017082cdea
@@ -33,6 +33,7 @@ def __init__(self, subdomain, username, password, domain=None, proxy=None,
self.protocol = secure and 'https' or 'http'

def _api_help(self, endpoint, params=None, method='GET'):
import ipdb; ipdb.set_trace()
s = requests.Session()
s.auth = (self.username, self.password)
url = '%s://%s.%s/%s' % (self.protocol, self.subdomain, self.domain,
@@ -41,7 +42,7 @@ def _api_help(self, endpoint, params=None, method='GET'):
if params and method != 'GET':
body = urlencode(params)
params = None
response = s.request(method, url, data=body, verify=True)
response = s.request(method, url, params=params, data=body, verify=True)
response.raise_for_status()
return response.json()

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.