Python Flask Request Data | The Dev Tool |

The docs describe the attributes available on the request object (from flask import request) during a request. In most common cases will be empty because it's used as a fallback:

from flask import request

@app.route('/', methods=['GET', 'POST'])
def parse_request():
    # data is usuall empty
    data =
    # Contains the incoming request data as string in case it came with a mimetype Flask does not handle.
    # the key/value pairs in the URL query string
    # the key/value pairs in the body, from a HTML post form, or JavaScript request that isn't JSON encoded
    # the files in the body, which Flask keeps separate from form. HTML forms must use  enctype=multipart/form-data or files will not be uploaded.
    # combined args and form, preferring args if keys overlap
    # parsed JSON data. The request must have the application/json content type, or use request.get_json(force=True) to ignore the content
    # Json of the request (only if Content type is Application/Json

Created by: Altin


This page is only partially working without JavaScript. It will show content, but the tools and interactivity cannot be shown without JavaScript enabled. Please enable JavaScript for this page. About Us