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/response.py | 37 ++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 6 deletions(-) (limited to 'sleekxmpp/plugins/xep_0332/stanza/response.py') diff --git a/sleekxmpp/plugins/xep_0332/stanza/response.py b/sleekxmpp/plugins/xep_0332/stanza/response.py index 7f8180bb..4dc14344 100644 --- a/sleekxmpp/plugins/xep_0332/stanza/response.py +++ b/sleekxmpp/plugins/xep_0332/stanza/response.py @@ -8,14 +8,39 @@ 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 Response(ElementBase): - pass + """ + When the HTTP Server responds, it does so by sending an `iq` stanza + response (type=`result`) back to the client containing the `resp` element. + Since response are asynchronous, and since multiple requests may be active + at the same time, responses may be returned in a different order than the + in which the original requests were made. -register_stanza_plugin(Iq, Response) -register_stanza_plugin(Response, Headers) + Examples: + + + +
Fri, 03 May 2013 16:39:54GMT-4
+
Clayster
+
text/turtle
+
...
+
Close
+
+ + + ... + + +
+
+ """ + + name = 'response' + namespace = NAMESPACE + interfaces = set(('statusCode', 'statusMessage', 'version')) + plugin_attrib = 'resp' -- cgit v1.2.3