Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: appengine/findit/common/http_client_appengine.py

Issue 2488113005: [Findit] Re-org code. (Closed)
Patch Set: Rebase. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « appengine/findit/common/codereview.py ('k') | appengine/findit/common/retry_http_client.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import json 5 import json
6 import logging 6 import logging
7 7
8 from google.appengine.api import urlfetch 8 from google.appengine.api import urlfetch
9 9
10 from common import auth_util 10 from common import auth_util
11 from common.retry_http_client import RetryHttpClient 11 from libs.http.retry_http_client import RetryHttpClient
12 12
13 13
14 # TODO(katesonia): Move this to config. 14 # TODO(katesonia): Move this to config.
15 _INTERNAL_HOSTS_TO_SCOPES = { 15 _INTERNAL_HOSTS_TO_SCOPES = {
16 'https://chrome-internal.googlesource.com/': ( 16 'https://chrome-internal.googlesource.com/': (
17 'https://www.googleapis.com/auth/gerritcodereview'), 17 'https://www.googleapis.com/auth/gerritcodereview'),
18 'https://codereview.chromium.org/': ( 18 'https://codereview.chromium.org/': (
19 'https://www.googleapis.com/auth/userinfo.email'), 19 'https://www.googleapis.com/auth/userinfo.email'),
20 } 20 }
21 21
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return result.status_code, result.content 65 return result.status_code, result.content
66 66
67 def _Get(self, url, timeout, headers): 67 def _Get(self, url, timeout, headers):
68 return self._SendRequest(url, urlfetch.GET, None, timeout, headers) 68 return self._SendRequest(url, urlfetch.GET, None, timeout, headers)
69 69
70 def _Post(self, url, data, timeout, headers): 70 def _Post(self, url, data, timeout, headers):
71 return self._SendRequest(url, urlfetch.POST, data, timeout, headers) 71 return self._SendRequest(url, urlfetch.POST, data, timeout, headers)
72 72
73 def _Put(self, url, data, timeout, headers): 73 def _Put(self, url, data, timeout, headers):
74 return self._SendRequest(url, urlfetch.PUT, data, timeout, headers) 74 return self._SendRequest(url, urlfetch.PUT, data, timeout, headers)
OLDNEW
« no previous file with comments | « appengine/findit/common/codereview.py ('k') | appengine/findit/common/retry_http_client.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698