Dear Michael,
Using HTTP Request Node, you can send POST requests with content type application/x-www-form-urlencoded.
I'm not sure if it's the same for Rest Request Nodes.
DECLARE redirecturi,granttype,clientsecret,authcode,Data CHARACTER;
SET redirecturi = 'redirecturi';
SET granttype = 'authorization_code';
SET clientsecret = 'clientsecret'
SET authcode = 'authcode';
SET Data = 'redirect_uri=' || redirecturi || '&grant_type=' || granttype || '&client_secret=' || clientsecret || '&code=' || authcode;
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/x-www-form-urlencoded';
SET OutputRoot.BLOB.BLOB = CAST(Data AS BLOB CCSID 1208);
------------------------------
Anoop C Pillai
------------------------------
Original Message:
Sent: Tue August 16, 2022 12:02 PM
From: Michael Bae
Subject: Sending POST request with content type 'application/x-www-form-urlencoded'
Hi folks,
I'm trying to see if I can send POST request with content type 'application/x-www-form-urlencoded' to IBM Datapower.
Using REST Request node, it looks like IBM AppConnect does not currently offer support for "formData".
LocalEnvironment
Destination
REST
Request
ContentType:CHARACTER:application/x-www-form-urlencoded
Accept:CHARACTER:application/json
BaseURL:CHARACTER:https://MASKED
UserID:CHARACTER:MASKED
Password:CHARACTER:MASKED
Parameters
password:CHARACTER:MASKED
client_id:CHARACTER:MASKED
client_secret:CHARACTER:MASKED
grant_type:CHARACTER:MASKED
username:CHARACTER:MASKED
acr_values:CHARACTER:MASKED
scope:CHARACTER:MASKED
Text:CHARACTER:Don't know how to propagate the value of this parameter
Insert
Type:INTEGER:5
Text:CHARACTER:Don't know how to propagate the value of this parameter
My question is if there is any alternative method to post request with content type 'application/x-www-form-urlencoded'
------------------------------
Michael Bae
------------------------------