Skip to Content
-1
Oct 09, 2018 at 10:15 AM

passing URL parameters using CL_HTTP_CLIENT for POST Method

4463 Views

I have to query an external URL to fetch some data that we have to use in our system.

Now recently the API was changed from GET to that of POST.

Earlier we had maintained the URL parameters directly in the RFC and were able to generate a successful response.

But now since the change in the API when i change the request method to post the QUERY parameters are not being passed to the Service.

For example if i my URL is "XXXX.XXXX.net/v1/oauth2/tokens?grant_type=client-credentials" the service only gets XXXX.XXXX.net/v1/oauth2/tokens. the Query parameters are being truncated by the post request.

I already checked the options in the Post

https://archive.sap.com/discussions/thread/3437183

Any other way forward? to make it work the way it was for the GET Method?