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

Unified Diff: tools/findit/common/http_client.py

Issue 465403004: [Findit] Support sending cookies for http requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/findit/common/cacert.pem ('k') | tools/findit/common/http_client_local.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/findit/common/http_client.py
diff --git a/tools/findit/common/http_client.py b/tools/findit/common/http_client.py
new file mode 100644
index 0000000000000000000000000000000000000000..82c358dedaae8a7724bd01d8be2bbd9057f6705a
--- /dev/null
+++ b/tools/findit/common/http_client.py
@@ -0,0 +1,21 @@
+# Copyright (c) 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+class HttpClient(object):
+ """Represent a http client for sending request to a http[s] server.
+
+ If cookies need to be sent, they should be in a file pointed to by
+ COOKIE_FILE in the environment.
+ """
+
+ @staticmethod
+ def Get(url, params={}, timeout=None):
+ """Send a GET request to the given url with the given parameters.
+
+ Returns:
+ (status_code, data)
+ state_code: the http status code in the response.
+ data: the body of the response.
+ """
+ raise NotImplemented()
« no previous file with comments | « tools/findit/common/cacert.pem ('k') | tools/findit/common/http_client_local.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698