Created
February 20, 2010 08:07
-
-
Save franckverrot/309577 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.appengine.ext import webapp | |
from google.appengine.api import xmpp | |
from google.appengine.ext.webapp.util import run_wsgi_app | |
class XMPPHandler(webapp.RequestHandler): | |
def post(self): | |
from = self.request.get('from') # XMPP style | |
message = xmpp.Message(self.request.POST) | |
message.reply("You "+message.body) | |
application = webapp.WSGIApplication([('/_ah/xmpp/message/chat/', XMPPHandler)],debug=True) | |
def main(): | |
run_wsgi_app(application) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment