SET_FLAGS

Optionally, set flags to control the behavior of the subsequent SEND operation.

UHTTP.SET_FLAGS(Flags)

UHTTP.SET_FLAGS(24) ; sets flags 8 and 16

Parameters

Parameter

Type

Direction

Description

Flags

string

IN

Sum of one or more codes that represent options to control the behavior of the next SEND request:

If not specified prior to a SEND call, or Flags is 0, none of these options is set.

The following flag codes are allowed:

1

Do not perform host verification. Errors caused by certificate host names that do not match the request host names are ignored. This is equivalent to the ign=H option for the SOAP connector.

This flag applies only to secure connections, that is, connections that use the https:// prefix.

2

Do not perform peer server verification. Errors caused by peer server certificates are ignored(do not perform peer server verification). This is equivalent to the ign=P option for the SOAP connector. For more information, see SOAP Connector Options.

If this flag is not set, the local certificate store file ca-bundle.crt should be present in the ..\common\usys directory.

This flag applies only to secure connections, that is, connections that use the https:// prefix.

4

Do not calculate the content-length of the payload itself for a POST method.

8

Send headers, if provided, with all methods. This is the default behavior. The flag is supported for compatibility purposes, and does not need to be set.

16

Enable each HTTP request/response to be handled individually. By default, status values in the 300 range are automatically redirected. By setting this flag, the redirections are not followed, enabling you to catch them and provide alternate processing.

Return Values

Values Returned in $status

Value

Meaning

0

Success

-12

An internal error occurred

Use

Can be used before the SEND operation.

Description

The SET_FLAGS operation is used to control the behavior of the SEND operation.

Note:  The UHTTP component uses the file ca-bundle.crt as the local certificate store. This file is not delivered as part of the installation, so you need to create it and copy it to the common\usys directory. For more information, see HTTPS Verification for Web Services.