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: 

POST using Rest API , Not able to get body

0 Kudos

Hello Experts

Please guide ,

Scenario: I am making a POST API call in the Postman Tool. I get a response back with a Token in the body . I am trying to now call the same API in ABAP . I am not able to get the body of the response although the message status is successful (200) . Can you pls advise if i am missing anything .

Thanks

Parmesh

Postman Request Details

Response Details

ABAP Code

7 REPLIES 7

Sandra_Rossi
Active Contributor
0 Kudos

What does lv_body look like before calling?

0 Kudos

Thank you Sandra for replying . The lv_body is correctly formatted as json

0 Kudos

I have the same problem, did you find the solution?

Thanks.

thomas_mller13
Participant
0 Kudos

Did you check "get_string_data"?

thomas_mller13_0-1713268416984.png

"response" should be the string and not an object.

0 Kudos

Yes I tried.

This error message occurred in the trace:

leonardo_buryanteixeira_0-1713384538233.png

Thanks for answering.

0 Kudos

What did you create in SM59? 

Koen_VL
Participant

most probably the request is failing. can you check the value of the http_status?

Looking at the trace error, most probably there is an issue with the SSL connectivity. Maybe the root certificate is not added in STRUST?

What could also help finding out the issue is to put the request in the SAP Gateway Client (transaction /IWFND/GW_CLIENT) and do the get from there. There you have more visibility on status codes and error messages.

hope it helps