The different parts of the HTTP Transformer
-
Request URI
This is the only required field for the HTTP Transformer. It should contain the URL of the web service to be accessed. For example: http://httpbin.org/json The field accepts the usage of placeholders to create dynamic parts in the URL. -
Request URI encoder
This helps configure specific encoding for the URL if needed. Based on the standard used in the target web service, certain characters in the request URL need to be encoded in a certain way. The encoder supports the RFC 1738 and the RFC 3986 standards. -
Request method
This specifies the type of action that has to be executed on the targeted web service. For example, POST to create an entity or DELETE to remove the entity. While all standard and non-standard HTTP request methods are supported, the default method is GET, which helps request data from given endpoints. The field supports placeholders that can be used to dynamically set the request method. -
Send payload with DELETE
By default, DELETE requests do not include a payload. To override this, you can activate the “Send payload with DELETE” checkbox. -
Plugins
Plugins are tools that can be used to influence the request or the received response. It is possible to define multiple plugins per request. -
Authentications
An authentication for the request can be configured if the targeted web service uses a security layer to prevent unauthorized access. The Transformer supports several popular authentication systems, from basic authentication (username, password) to OAuth 2.0 with specific providers. -
Payload type
This is used to configure the data or the body of the message that is sent to the endpoint. The encoded data will usually be the go-to format. It can be converted to several commonly used web formats by using the request encoder. This feature includes support for many payload types. -
HTTP Client
This feature helps configure a custom client for specific requirements. This can include extended logging, custom error handling, or pre-defined authentication methods. -
Response decoder
This helps describe how the response to a request is to be handled. By default, it assumes the response contains JSON. If the requested endpoint returns another format than JSON, it can be configured here. -
Add headers to response body
If this box is checked, the headers of the received response are added to a specific key in the response body. The response headers will be added to the key “headers” and the response data will be moved to a key named “data”. This can be processed further in other Transformers if needed. -
Include all items
This feature helps include all items when the deserializer returns a list.