Skip to content

Instantly share code, notes, and snippets.

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)
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
@damdev
damdev / serverPythonWithUpload.py
Created September 28, 2012 20:18
Server python with upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""