Skip to content
timotheus edited this page Feb 14, 2013 · 2 revisions

This HTML class can be used to make traditional HTTP/REST calls.

##Usage

from ebaysdk import html
api = html()
api.execute('https://github.com/timotheus/ebaysdk-python/wiki.atom')
print api.response_dict()

Public Methods

html(**kwargs)

Keyword arguments to html() constructor

debug         -- debugging enabled (default: False)
method        -- GET/POST/PUT (default: GET)
proxy_host    -- proxy hostname
proxy_port    -- proxy port number
timeout       -- HTTP request timeout (default: 20)
parallel      -- ebaysdk parallel object

execute(verb, data)

Execute the HTTP request.

api.execute('https://github.com/timotheus/ebaysdk-python/wiki.atom', {'arg1': 'val1'})

error()

Returns a string of the HTTP call errors

if api.error():
    print "has errors: %s" % api.error()

response_dom()

Return a DOM object (xml.dom.minidom) of the HTTP response content.

response_dict()

Return a dictionary of the HTTP response content.

response_content()

Returns the string content from HTTP response call.

response_soup()

Returns a BeautifulSoup object of the response

response_code()

Returns the HTTP response code.

response_status()

Returns the HTTP response status

Clone this wiki locally