Request Body Parameters

Request parameters are typically added to the request body when forms are submitted by a browser which is instructed to use the POST request method. A Web form (in HTML) can be used to achieve this; for example:

<form method="post" action="http://www.boddie.org.uk/application">
<input name="param1" type="text" value="value1" />
<input name="param2" type="text" value="value2" />
</form>

As a consequence of this form being submitted, the following parameters will become available in the application:

Parameters encoded in this way are not transferred in URLs and are mostly hidden in user interfaces, although viewing a Web page's source can often reveal default values of such parameters.

WebStack API - Accessing Body Parameters

Transaction objects provide the following methods to access parameters specified in request headers. The terminology used in the API describes such parameters as body fields, since such parameters are often provided by form fields.

get_fields_from_body
This returns the request parameters (fields) found in the request body (as defined in Web forms). The fields are provided in a dictionary mapping field names to lists of values. Each value will be a Unicode object unless the value represents uploaded file content (see below).
An optional encoding parameter may be used to assist the process of converting parameter values to Unicode objects - see below for a discussion of the issues with this parameter.

Some limitations exist with request body parameters:

File Uploads

One way request body parameters may be used is to provide a mechanism for the uploading of entire files from browsers and other Web clients to applications. Unlike other parameters, those which carry file upload data expose the contents of such uploaded files as FileContent objects instead of Unicode objects.

Unsupported Environments and Framework Issues