Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unreadable characters in HTTP_GET function module

former_member596005
Participant
0 Kudos

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.

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor

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).

3 REPLIES 3

Sandra_Rossi
Active Contributor

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).

0 Kudos

Hi Sandra,

Sorry for my late comment, Can you please help me with decoding?

0 Kudos

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).