def processRequest(self, Method=None, ContentLength=None, *args, **kwargs):
     if Method != 'POST':
         return
     result = yield http.readRe('(?P<BODY>.*)', ContentLength)
     body = result['BODY']
     yield http.ok()
     yield http.headers('a', 'b')
     yield 'Hello ' + body
 def processRequest(self, Method=None, ContentLength=None, *args, **kwargs):
     if Method != 'POST':
         return
     result = yield http.readRe('(?P<BODY>.*)', ContentLength)
     body = result['BODY']
     yield http.ok()
     yield http.headers('a', 'b')
     yield 'Hello ' + body
Пример #3
0
 def handle(this, ContentLength):
     body = yield http.readRe('(?P<BODY>.*)', ContentLength)
     self.assertEquals('XXYYZZ', body['BODY'])
     yield http.ok()
     yield http.noheaders()
     yield 'this was the post handler'
 def handle(this, ContentLength):
     body = yield http.readRe('(?P<BODY>.*)', ContentLength)
     self.assertEquals('XXYYZZ', body['BODY'])
     yield http.ok()
     yield http.noheaders()
     yield 'this was the post handler'