UHTTP_WPOST_FORM
Uniface logical that, on Windows platforms only, determines whether a default
Content-Type
header is added to POST
requests.
UHTTP_WPOST_FORM { =
} T
| F
Arguments
T
—a defaultContent-Type
header is added on Windows platforms:F
(or any other value, or undefined)—noContent-Type
header is added on Windows platforms. Default.The default behavior ensures backward compatibility with Uniface versions prior to 9.7.01.
Defaults
Assignment file: | Application assignment file |
Section: | [LOGICALS] |
Default value: | F
|
Description
UHTTP_WPOST_FORM is a compatibility switch that enables you to make the behavior of the SEND operation consistent on both Windows and Unix.
For historical reasons, there is a difference in
behavior on Windows and Unix when using the POST
method with the UHTTP
SEND operation:
- On Unix platforms, if no
Content-Type
header is specified in the Headers parameter when thePOST
method is used, the headerContent-Type: application/x-www-form-urlencode
is automatically added. - On Windows, no
Content-Type
header is added.
To ensure that the default behavior is the same on
all platforms, it is recommended that you set the logical
UHTTP_WPOST_FORM = T
in your assignment file. This ensures that
the default Content-Type
header is added for POST
requests on
both Uniface and Windows platforms.