Request

napkin.request

Use the global request object to access incoming request data. Napkin parses incoming requests to your endpoint and stores the data in the request object. The object has the following fields.

args

type: dict

From: https://flask.palletsprojects.com/en/1.1.x/api/#flask.Request.args

The parsed URL parameters (the part in the URL after the question mark).

body

type: dict

cookies

type: str

From: https://flask.palletsprojects.com/en/1.1.x/api/#flask.Request.cookies

Contents of all cookies transmitted with the request.

data

type: str

From: https://flask.palletsprojects.com/en/1.1.x/api/#flask.Request.data

Contains the incoming request data as string in case it came with a mimetype Werkzeug does not handle.

files

Coming Soon

form

type: dict

From: https://flask.palletsprojects.com/en/1.1.x/api/#flask.Request.form

The form parameters

full_path

type: str

From: https://flask.palletsprojects.com/en/1.1.x/api/#flask.Request

Requested path, including the query string.

headers

type: dict

Dictionary of incoming request headers.

is_json

type: bool

Whether or not request payload is in JSON format. Determined by the request mimetype (either application/json or application/*+json).

method

type: str

The incoming HTTP method. Current supported methods: GET, POST, PUT, DELETE

path

type: str

Requested path.

path_params

type: dict

Dictionary of path parameter values based on the path variables defined in "Run Options" of the Napkin UI.