libbe.util.http

exception libbe.util.http.HTTPError(error=None, url=None, msg=None)
libbe.util.http.get_post_url(url, get=True, data=None, data_dict=None, headers=[], agent=None)

Execute a GET or POST transaction.

Parameters :

url : str

The base URL (query portion added internally, if necessary).

get : bool

Use GET if True, otherwise use POST.

data : str

Raw data to send by POST (requires POST).

data_dict : dict

Data to send, either by URL query (if GET) or by POST (if POST). Cannot be given in combination with data.

headers : list

Extra HTTP headers to add to the request.

agent : str

User agent string overriding the BE default.

Previous topic

libbe.util.encoding

Next topic

libbe.util.id

This Page