2021 Oct 29 1:12 PM
Hi All,
I am using HTTP_GET function module to get the exchange data through API. The function module able to return the status 200 but the response body of the function module returning unreadable characters. Do i need to pass any headers to get the exact output as when i check through Postman/web browser its returning exact data.
This is the reponse in the function module.
Please help me with this.
2021 Oct 29 4:09 PM
Probably it's in UTF-8 encoding. No error here. Create an ABAP program to decode the UTF-8. Note that you should not use HTTP_GET. Use CL_HTTP_CLIENT and other classes, it will be easier for you to get directly the characters (implicit decode).
2021 Oct 29 4:09 PM
Probably it's in UTF-8 encoding. No error here. Create an ABAP program to decode the UTF-8. Note that you should not use HTTP_GET. Use CL_HTTP_CLIENT and other classes, it will be easier for you to get directly the characters (implicit decode).
2021 Nov 24 8:51 AM
Hi Sandra,
Sorry for my late comment, Can you please help me with decoding?
2021 Nov 24 10:13 AM
You have lots of examples in the Web how to use CL_HTTP_CLIENT. Method GET_CDATA to get the text (it will automatically decode if the request contains the header field "content-type" with mention to the utf-8 character set).