Setting cURL Options on the URL Adapter
The URL adapter uses cURL. In some cases you might want to set cURL options on an URL adapter request, e.g. to specify a timeout. You can do that by adding these cURL options on the URL alias to the options attribute. To specify multiple cURL options, list them separated by ',
' (comma) or ' ' (blank). If an option allows for multiple values, you can concatenate them by using the '|'
(pipe) operator.
Examples:
CURLOPT_CONNECTTIMEOUT=60
(see note below for a hint regarding this option)CURLOPT_CONNECTTIMEOUT=60, E2E_FORBID_REUSE=true
CURLOPT_CONNECTTIMEOUT=60 E2E_FORBID_REUSE=true
CURLOPT_HTTPAUTH=CURLAUTH_NTLM|CURLAUTH_NEGOTIATE, E2E_FORBID_REUSE=true
Setting cURL Options dynamically
Alternatively, it is possible to provide the cURL options dynamically.
The options parameter is an array of Base Components.Add Ons.Option, describing a name/value pair. Set the cURL option you want to provide to attribute name and the value to attribute value.
Then, provide the options array to parameter options of the URL adapter as shown below.
Persisted variable curlOptions is an array of Option. It contains the cURL options as name/value pairs. The execution diagram provides this variable to the parameter option of the URL adapter call (request).
The contents of curlOptions need to be prepared before in a dedicated operation, e.g. a mapping diagram.
Scheer PAS cURL Options
Option | Data Type | Remarks |
---|---|---|
| Boolean | If |
Native cURL Options
The following options - listed in alphabetical order - are currently supported (refer to the cURL documentation for more details).
Legend: | Option is recognized and forwarded to cURL |
---|
cURL Data Types
All cURL data types can be set by using xUML Base Type String :
cURL Data Type | xUML Base Type | Comment |
---|---|---|
Array(String) | Array of Strings | You must use a cast() to use this type, because the URL option value is of type String. |
Bitmask | String | It is a string containing a string of cURL options separated by the pipe character ("|"). |
Blob | n/a | Is not supported. |
Boolean | String | You can use |
Callback | n/a | Is not supported. |
Constant | String | Use the defined strings from cURL. For example, for the option |
FileHandle | n/a | Is not supported. |
Integer | String | String will be converted to a number. |
String | String |
List of Supported Options
Option | Data Type | Supported | Supported cURL Constants / Remarks | |
---|---|---|---|---|
| String | |||
| Integer | |||
| String | |||
| Boolean | |||
| String | |||
| Integer | |||
| String | |||
| String | |||
| Integer | In seconds (see cURL documentation). | ||
| Integer | In seconds (see cURL documentation). This timeout applies to the connection phase of the TCP/IP protocol only. If you want to use timeout limiting the whole interaction time, use | ||
| Boolean | |||
| Boolean | |||
| String | |||
| Callback | |||
| Callback | |||
| Callback | |||
| String | |||
| String | |||
| String | |||
| String | |||
| Boolean | |||
| String | |||
| Blob | |||
| Callback | |||
| String | |||
| Integer | In seconds (see cURL documentation). | ||
| Boolean | |||
| Boolean | |||
| Boolean | |||
| Integer | |||
| String | |||
| String | |||
| String | |||
| Blob | |||
| Integer | |||
| Boolean | |||
| Boolean | |||
| Boolean | |||
| Boolean | |||
| String | |||
| String | |||
| Boolean | |||
| Boolean | |||
| Constant |
| Same behavior as if no method is specified. | |
| cURL does a single CWD operation for each path part in the given URL. | |||
| cURL does no CWD at all. | |||
| libccURL does one CWD with the full target directory and then operates on the file "normally". | |||
| Boolean | |||
| Integer | In seconds (see cURL documentation). | ||
| String | |||
| Boolean | |||
| Constant | Deprecated. Use CURLOPT_USE_SSL instead. | ||
| Boolean | false represents | ||
| Constant |
| Allow cURL to decide. | |
| Try SSL first, and only if that fails try TLS. | |||
| Try TLS first, and only if that fails try SSL. | |||
| Boolean | |||
| Boolean | |||
| String | |||
| Boolean | |||
| Integer | |||
| String | |||
| Boolean | |||
| Blob | |||
| Callback | |||
| Constant |
| cURL will automatically select the one it finds most secure. | |
| All except basic authentication. cURL will automatically select the one it finds most secure. | |||
| AWS V4 signature (see CURLOPT_AWS_SIGV4). | |||
| basic authentication | |||
| digest authentication | |||
| deprecated, use | |||
| negotiate (SPNEGO) authentication | |||
| NTLM authentication | |||
| Boolean | |||
| Array(String) | |||
| Other | |||
| Boolean | |||
| Constant |
| cURL will use whatever HTTP version it thinks fit. | |
| Enforce HTTP 1.0 requests. | |||
| Enforce HTTP 1.1 requests. | |||
| Array(String) | |||
| Boolean | |||
| Integer | |||
| Integer | |||
| String | |||
| Blob | |||
| Callback | |||
| Constant |
| Resolves addresses to all IP versions that your system allows. | |
| Resolve to IPv4 addresses. | |||
| Resolve to IPv6 addresses. | |||
| String | |||
| String | |||
| String | |||
| Integer | |||
| Integer | |||
| Integer | |||
| Integer | In seconds (see cURL documentation). | ||
| Integer | |||
| Integer | |||
| Integer | |||
| Integer | |||
| Integer | |||
| Integer | |||
| Integer | |||
| Integer | |||
| Constant |
| Tells libcurl to escape multipart form field and file names using the backslash-escaping algorithm rather than percent-encoding (HTTP only). See cURL documentation for more. | |
| Constant |
| The use of your | |
| cURL will ignore the file and use only the information in the URL. | |||
| The use of the file is required, the information in the URL is ignored. | |||
| String | |||
| Integer | |||
| Integer | |||
| Boolean | |||
| Boolean | |||
| String | See cURL documentation. | ||
| Boolean | |||
| Array(String) | |||
| String | |||
| String | |||
| Integer | |||
| Boolean | |||
| Blob | |||
| Integer | |||
| Integer | |||
| Array(String) | |||
| String | |||
| Array(String) | |||
| Blob | |||
| Callback | |||
| Blob | |||
| Blob | |||
| Callback | |||
| String | |||
| String | |||
| Constant |
| basic authentication | |
| digest authentication | |||
| negotiate (SPNEGO) authentication | |||
| deprecated, use | |||
| NTLM authentication | |||
| cURL will automatically select the one it finds most secure. | |||
| All except basic authentication. cURL will automatically select the one it finds most secure. | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| Integer | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| String | |||
| Constant |
| HTTP proxy | |
| SOCKS4 proxy | |||
| SOCKS5 proxy | |||
| String | |||
| String | |||
| Boolean | |||
| Boolean | |||
| String | |||
| String | |||
| Blob | |||
| Callback | |||
| String | |||
| String | |||
| String | |||
| Integer | |||
| Integer | |||
| Integer | |||
| String | |||
| String | |||
| String | |||
| String | |||
| Constant |
| ||
| Blob | |||
| Callback | |||
| String | |||
| String | |||
| String | |||
| String | |||
| FileHandle | |||
| String | |||
| String | |||
| String | |||
| String | |||
| Blob | |||
| Callback | |||
| String | |||
| None | |||
| String | |||
| String | |||
| String | |||
| Constant |
| Tells libcurl to not attempt to use any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. See cURL documentation for more. | |
| Boolean | |||
| Integer | |||
| Boolean | |||
| Integer | |||
| Constant |
| Default action. This will attempt to figure out the remote SSL protocol version. | |
| Use TLSv1.x. | |||
| Use SSLv2. | |||
| Use SSLv3. | |||
| FileHandle | |||
| Boolean | |||
| Array(String) | |||
| Constant |
| ||
| ||||
| Integer | In seconds (see cURL documentation). | ||
| Integer | In milliseconds (see cURL documentation). | ||
| Integer | |||
| Integer | |||
| String | |||
| Boolean | |||
| Boolean | |||
| Boolean | |||
| String | |||
| Constant |
| Do not attempt to use SSL. | |
| Try using SSL, proceed as normal otherwise. | |||
| Require SSL for the control connection | |||
| Require SSL for all communication. | |||
| String | |||
| String | |||
| Boolean | |||
| Blob | |||
| Callback | |||
| Bitmask | |||
| String |
Related Pages: