""" SleekXMPP: The Sleek XMPP Library Implementation of HTTP over XMPP transport http://xmpp.org/extensions/xep-0332.html Copyright (C) 2015 Riptide IO, sangeeth@riptideio.com This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from sleekxmpp.xmlstream import ElementBase class Request(ElementBase): """ All HTTP communication is done using the `Request`/`Response` paradigm. Each HTTP Request is made sending an `iq` stanza containing a `req` element to the server. Each `iq` stanza sent is of type `set`. Examples:
b.com
b.com
text/html
...
<html><header/><body><p>Beautiful home page.</p></body></html>
""" name = 'request' namespace = 'urn:xmpp:http' interfaces = set(['method', 'resource', 'version']) plugin_attrib = 'req' def get_method(self): print "Request:: get_method()" def set_method(self, method): print "Request:: set_method()" self._set_attr('method', method) def get_resource(self): print "Request:: get_resource()" def set_resource(self, resource): print "Request:: set_resource()" self._set_attr('resource', resource) def get_version(self): print "Request:: get_version()" def set_version(self, version='1.1'): print "Request:: set_version()" self._set_attr('version', version)