_requestURL(self,
url,
data=None,
headers={u'User-Agent': USER_AGENT})
| source code
|
Queries the given URL with the given HTTP headers and optional
data.
If data is not None , the request method will
be PUT , GET otherwise.
If exceptions are thrown, they will be logged and the function returns
None. Otherwise the servers response is returned.
- Parameters:
url (string) - The URL to be requested from the server.
data (dict or sequence of two-element tuples) - Optional data to be sent to the server.
headers (dict) - Optional headers to be sent with the request. Defaults to
User-Agent: USER_AGENT .
|