Skip to Content
0
Oct 02, 2019 at 08:14 AM

Consuming REST service with GET method and chunked response in ABAP.

156 Views

Hi,

I recently bumped into a situation where I need to get the full result of a response from REST service that incorporates the GET method.

It has an addition at the end of the JSON string when the first GET call was made that looks like this:

],"first":{"$ref":"http://some_server/test/"},"next":{"$ref":"http://some_server/test/?page=1"}}

The subsequent action(s) is to call via GET the string that stands in the "next": tag until no such tag exists.

This of course can be programmed in custom code but before doing that I wanted to know if SAP has already included this in its own code. I found plenty of examples of how to POST multipart request but no multipart response consumption...

Has anyone met a code that handles this situation?

As I am in a bit of a hurry I will spend no more time in research and will rather code the missing part myself. But still .... I am curious if this can be done with the existing SAP functionality.

Cheers,

Ivan