exception libbe.util.http.HTTPError(error=None, url=None, msg=None)
libbe.util.http.HTTP_USER_ERROR = 418

Status returned to indicate exceptions on the server side.

A BE-specific extension to the HTTP/1.1 protocol (See RFC 2616).

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


Next topic

This Page