From ab96ed2917af81266397870a80784d6f83cf9d36 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Thu, 8 Dec 2016 11:59:59 -0800 Subject: [PATCH] Add a python example showing how to get at request data --- examples/python/requestdata.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 examples/python/requestdata.py diff --git a/examples/python/requestdata.py b/examples/python/requestdata.py new file mode 100644 index 00000000..07673f85 --- /dev/null +++ b/examples/python/requestdata.py @@ -0,0 +1,5 @@ +from flask import request + +def main(): + msg = "%s %s:\n---HEADERS---\n%s\n--BODY--\n%s\n-----\n" % (request.method, request.path, request.headers, request.get_data()) + return msg