10-29-2021 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.
10-29-2021 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).
10-29-2021 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).
11-24-2021 8:51 AM
Hi Sandra,
Sorry for my late comment, Can you please help me with decoding?
11-24-2021 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).