Web service & content-type application/x-www-form-urlencoded

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
Post Reply
sandrocarosso
Posts: 12
Joined: Mon Dec 05, 2022 1:58 pm

Web service & content-type application/x-www-form-urlencoded

Post by sandrocarosso »

Hello everyone, I am trying to consume a web service to obtain a token via user and password.
The content-type must be application/x-www-form-urlencoded.
The credentials must be passed in the format:
grant_type=client_credentials&client_id=Your_client_ID&client_secret=Your_secret.
If I try to consume the web service via SoapUI, the token is correctly returned.
If I consume it via HTTPAPI from Iseries, nothing seems to be transmitted.
I attach the log from debugging.

Thank you for your support.

Alessandro Carosso
Attachments
SoaupUI.pdf
This is what appears from SoapUI
(61.05 KiB) Downloaded 18 times
WSFEX00.pdf
Log from Iseries
(77.43 KiB) Downloaded 15 times
Scott Klement
Site Admin
Posts: 884
Joined: Sun Jul 04, 2021 5:12 am

Re: Web service & content-type application/x-www-form-urlencoded

Post by Scott Klement »

Please don't convert the debug log to a Word document or PDF, just send the original document unaltered. Changing it to these document formats can change the way blank lines are handled, the way characters are translated, etc. Just send the original document unchanged so I can see the details as they are.

There is no obvious problem in what you've sent me.

It would also be helpful to see the RPG code.
sandrocarosso
Posts: 12
Joined: Mon Dec 05, 2022 1:58 pm

Re: Web service & content-type application/x-www-form-urlencoded

Post by sandrocarosso »

Hi Scott, I tried again this morning and the webservice worked correctly, so I'm thinking that the error is not related to the programme.
Sorry to bother you and thanks for the support.
Post Reply