""" 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
...
...
""" name = 'request' namespace = 'urn:xmpp:http' interfaces = set(['method', 'resource', 'version']) plugin_attrib = 'req' def get_method(self): return self._get_attr('method', None) def set_method(self, method): self._set_attr('method', method) def get_resource(self): return self._get_attr('resource', None) def set_resource(self, resource): self._set_attr('resource', resource) def get_version(self): return self._get_attr('version', None) def set_version(self, version='1.1'): self._set_attr('version', version)