OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 class HttpClient(object): |
| 6 """Represent a http client for sending request to a http[s] server. |
| 7 |
| 8 If cookies need to be sent, they should be in a file pointed to by |
| 9 COOKIE_FILE in the environment. |
| 10 """ |
| 11 |
| 12 @staticmethod |
| 13 def Get(url, params={}, timeout=None): |
| 14 """Send a GET request to the given url with the given parameters. |
| 15 |
| 16 Returns: |
| 17 (status_code, data) |
| 18 state_code: the http status code in the response. |
| 19 data: the body of the response. |
| 20 """ |
| 21 raise NotImplemented() |
OLD | NEW |