Created
June 3, 2015 13:37
-
-
Save damdev/de0b533c73b6c03ecb64 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 flask import Flask, request | |
import zlib | |
import xml.dom.minidom | |
app = Flask(__name__) | |
@app.route('/', defaults={'path': ''}, methods=['POST', 'GET']) | |
@app.route('/<path:path>', methods=['POST', 'GET']) | |
def catch_all(path): | |
print 'path: %s' % path | |
print 'request.data: %s' % xml.dom.minidom.parseString(zlib.decompress(request.data, 16+zlib.MAX_WBITS)).toprettyxml(indent=' ') | |
print '=============================================================================' | |
return '' | |
if __name__ == '__main__': | |
app.run(port = 8081, debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment