PeopleSoft REST Form-Data to Third Party
I am try to connect to a third party REST service that uses form-data. I am setting the Content-Type to application/x-www-form-urlencoded, but I also need to set another header value that acts as authentication token. This issue applies to both POST and GET methods.
&outMSG = CreateMessage(Operation.ABC_NODE_GET, %IntBroker_Request);
&doc = &outMSG.GetURIDocument();
&outCom = &doc.DocumentElement;
&outCom.GetPropertyByName("version").value = "v2";
&outCom.GetPropertyByName("node").value = "7932";
&outMSG.URIResourceIndex = 1;
&ret = &outMSG.IBInfo.IBConnectorInfo.AddConnectorProperties("authtoken", "TKQFk8eDUDlIssKLT/2", %Header);
&outMSG.SegmentContentType = "application/x-www-form-urlencoded";
&inMSG = %IntBroker.SyncRequest(&outMSG);
When I check the MsgLog.html I can see that the following headers are added by PeopleSoft: