From e1f25604ecbf5d6c196080cd8394191c7ea459c9 Mon Sep 17 00:00:00 2001 From: Sangeeth Saravanaraj Date: Wed, 28 Jan 2015 14:52:15 +0530 Subject: Added callbacks, registered stanzas, added features, etc. --- sleekxmpp/plugins/xep_0332/stanza/request.py | 40 +++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 6 deletions(-) (limited to 'sleekxmpp/plugins/xep_0332/stanza/request.py') diff --git a/sleekxmpp/plugins/xep_0332/stanza/request.py b/sleekxmpp/plugins/xep_0332/stanza/request.py index 3d75b534..ea2650c0 100644 --- a/sleekxmpp/plugins/xep_0332/stanza/request.py +++ b/sleekxmpp/plugins/xep_0332/stanza/request.py @@ -8,14 +8,42 @@ See the file LICENSE for copying permission. """ -from sleekxmpp import Iq -from sleekxmpp.xmlstream import ElementBase, register_stanza_plugin -from sleekxmpp.plugins.xep_0131.stanza import Headers +from sleekxmpp.xmlstream import ElementBase +from sleekxmpp.plugins.xep_0332.stanza import NAMESPACE class Request(ElementBase): - pass + """ + 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 = NAMESPACE + interfaces = set(('method', 'resource', 'version')) + plugin_attrib = 'req' -register_stanza_plugin(Iq, Request) -register_stanza_plugin(Request, Headers) -- cgit v1.2.3