Andy Whitcombe
New Member
Morning All,
I am using RequestBuilder for the first time, and I coming across an error, which I am struggling to resolve.
Using the following code
I get the following error
If I debug the component parts and post using Postman, I see a success.
Please notes the HMAC in the following screen shot is not the same, its from a test I did yesterday, so the calculated value is different
I am hoping people with more experience of RequestBuilder can spot something obvious.
Thanks.
I am using RequestBuilder for the first time, and I coming across an error, which I am struggling to resolve.
Using the following code
Code:
oClient = ClientBuilder:Build():Client.
/* User Name, Password and Domain... we dont have these
oServiceCredentials = NEW Credentials(ipServerURL, ipUserID, ipPassword).
*/
oRequestBody = NEW String(oRequest:GetJsonText()). /* The JSON AS A LONGCHAR*/
oRequest = RequestBuilder:Post(SubmissionURL, oRequestBody) /* Submit Request TO URL, Payload is the JSON */
:ContentType("application/json")
:AddHeader("Authorization",SigningStringHMAC)
:AddHeader("Indentation","2")
:AddHeader("partnerId","XYZ")
:AddHeader("Timestamp",SUBSTRING(ISO-DATE(SigningStringTimeStamp),1,23) + "Z")
:AcceptJson()
:Request.
oResponse = oClient:Execute(oRequest).
CATCH e AS Progress.Lang.Error :
MESSAGE "APW DEBUG " STRING(TODAY) STRING(TIME,"HH:MM:SS") SKIP
PROGRAM-NAME(1) SKIP
DYNAMIC-FUNCTION("TranslateText","e:GetMessage(1)") e:GetMessage(1)
VIEW-AS ALERT-BOX INFORMATION TITLE DYNAMIC-FUNCTION("TranslateText","APW DEBUG MESSAGE") .
END CATCH.
I get the following error
Code:
e:GetMessage(1) Authorization header value must have at least 2 " "-delimited parts: ixQVrK2qH6bajs2ZeHxsJaoBwwjOgs0eHFBvwMwvFqE=
If I debug the component parts and post using Postman, I see a success.
Please notes the HMAC in the following screen shot is not the same, its from a test I did yesterday, so the calculated value is different
I am hoping people with more experience of RequestBuilder can spot something obvious.
Thanks.