RFC 3986 Support for Encoding Query Parameters
The REST Adapter supports encoding query parameters.
The REST Adapter supports encoding query parameters in accordance
with RFC 3986 standards. The default behavior is to
encode the query parameters following the
application/x-www-form-urlencoded
scheme.
For most older services that expect query parameters to be encoded
following the application/x-www-form-urlencoded
scheme, the default scheme should work. If you find the target
endpoint not behaving correctly with the default encoding scheme,
the REST Adapter can also be configured to strictly follow RFC 3986.
A very common scenario in which the default behavior may not be
desirable is when the target service expects space characters
encoded as %20
in the query parameters. In this
case, the default behavior is to encode space characters as
+
. Some new services may also respond with
HTTP 400
(bad data) if query parameters are
encoded in the application/x-www-form-urlencoded
scheme. In these cases, you can switch to the RFC 3986 standard and
check if the service responds correctly. To use RFC 3986 (and
override the default behavior), perform the following steps to
configure the REST Adapter as an invoke connection (and not as a trigger
connection) in the Adapter Endpoint Configuration Wizard and in the
mapper.
-
On the Basic Info page, select the Custom check box for Configure Request Headers.
-
On the Request Headers page, add the
x-ics-use-x-www-form-urlencoded
custom header and optionally provide a description. -
Complete the Adapter Endpoint Configuration Wizard.
-
In the mapper, set the x-ics-use-x-www-form-urlencoded custom header to
false
.
The REST Adapter automatically encodes all query parameters in accordance with RFC 3986 in the outgoing request for this invoke connection.