@FunctionalInterface public interface PlayServiceCall<Request,Response> extends ServiceCall<Request,Response>
|Modifier and Type||Method and Description|
Low level hook for implementing service calls directly in Play.
Invoke the service call.
default CompletionStage<Response> invoke(Request request)
play.mvc.EssentialAction invoke(Function<ServiceCall<Request,Response>,play.mvc.EssentialAction> wrapCall)
This can only be used to hook into plain HTTP calls, it can't be used to hook into WebSocket calls.
wrapCall- A function that takes a service call, and converts it to an EssentialAction. This action can then be composed to modify any part of the request and or response, including request and response headers and the request and response body. This does not have to be invoked at all if it's not desired, but may be useful to get the benefit of all the Lagom features such as serialization and deserialization.