HTTP_POINT_ADDL_HEADER Header parameters
Posted: Wed Jul 30, 2025 6:26 pm
Hello All,
Question on the HTTP_POINT_ADDL_HEADER routine.
I have a requirement where I need to create a webservice which will include HEADER parameters and a REQUEST body.
The HEADER parameters are:
IvUserKey
ivUserBic
The Request Body parameters are:
party
partyAccount
I have never used HTTPAPI to add header parameters, looking at existing posts I think I need to do something like this using
Is this the correct way to go about this?
Thankyou for your time, much appreciated
Question on the HTTP_POINT_ADDL_HEADER routine.
I have a requirement where I need to create a webservice which will include HEADER parameters and a REQUEST body.
The HEADER parameters are:
IvUserKey
ivUserBic
The Request Body parameters are:
party
partyAccount
I have never used HTTPAPI to add header parameters, looking at existing posts I think I need to do something like this using
Code: Select all
// Notify httpapi of the routine to use to add headers
http_xproc( HTTP_POINT_ADDL_HEADER: %paddr(AddHeaders));
// --------------------------------------------------
// Perform the http request and get back the response
// --------------------------------------------------
Monitor;
wResponse = http_string('POST': wUrl: eJsonString: 'application/json');
dcl-proc AddHeaders;
dcl-pi *n;
toBeAdded varchar(32767);
end-pi;
toBeAdded = 'IvUserKey: valuea' + x'0d25'
+ 'ivUserBic: valueb' + x'0d25';
end-proc;
Thankyou for your time, much appreciated