What is the difference between payload and payloadObject in pub.apigateway.invokeISService.specifications:RequestSpec?

I see when Content-Type: application/x-www-form-urlencoded, the payloadObject is initialized with the request data as bytes. For Content-Type application/json, it is available in payload variable. I couldn’t find the documentation for the same.

Secondly, if I need to send the data with Content-Type: application/x-www-form-urlencoded to the native API with some custom params, should i reset the payloadObject in the flow service as part of request transformation or is there a better approach to do the same through declarative style policies?

Hi Farhan,
When data is sent in the “application/x-www-form-urlencoded” format, typically through an HTTP POST request, the content type of the request will be set to “application/x-www-form-urlencoded”. This content type indicates that the data is encoded as key-value pairs separated by “&” characters, where keys and values are URL-encoded.

When we submit the request to API GW the n in the analytics page the request and response will shown as bytes. but the client which has invoked the request will get the data in the format which has been sent from server.

Now answering your questions.

  1. With respect to the documentation for content-type as “application/x-www-form-urlencoded”. Its quite straight forward how to submit the request to API GW and how it works. but still if you want please raise the support Incident.
  2. As API GW supports the processing of " application/x-www-form-urlencoded" data type. You can sent the data in this format only then same can be routed to the native API for getting the response. And all other custom params can be set at API GW by using request transformation policy. IMO we should follow this approach, As it gives more control to the client what they want to send.

Regards
Vikash Sharma