cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAP / RAP OData Callback function with respond-async

Former Member

Hi,

anyone know if it possible to use the respond-async feature of OData v4.01 in SAP CAP or RAP? https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_Preferencecallback...

Scenario is to call a long running function and get the result returned to a specific URL provided in the function call. Thus instead of having a blocking synchronous request-response you have a non-blocking async request-callback.

Kind regards
Kai

martinstenzig
Contributor
0 Kudos

I tried adding an additional header (Prefer: callback; url="http://myserver/notfication/token/12345") to my CAP project but I don't get any result, or error. I am pretty sure this is not implemented as of CAP 7.0.2, but I let the SAP team make the final announcement.... like the concept though. 🙂

Accepted Solutions (0)

Answers (1)

Answers (1)

edna_teich
Explorer
0 Kudos

Hi Kai,

same question on my side. We would like to make an asynchronous GET in RAP oData v4.

You can call a request with Prefer respond-async which will return a location URL as described in

https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_Preferencecallback....

But the response body only contains the first 100 results and becomes invalid after the first call.

Therefore, there seems to be no way to access data beyond the first page of entries.

Best Regards,

Edna