Package io.dapr.client
Class DaprHttp
java.lang.Object
io.dapr.client.DaprHttp
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
HTTP Methods supported.static class
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Shutdown call is not necessary for OkHttpClient.reactor.core.publisher.Mono<DaprHttp.Response>
invokeApi
(String method, String[] pathSegments, Map<String, List<String>> urlParameters, byte[] content, Map<String, String> headers, reactor.util.context.ContextView context) Invokes an API asynchronously that returns a text payload.reactor.core.publisher.Mono<DaprHttp.Response>
invokeApi
(String method, String[] pathSegments, Map<String, List<String>> urlParameters, String content, Map<String, String> headers, reactor.util.context.ContextView context) Invokes an API asynchronously that returns a text payload.reactor.core.publisher.Mono<DaprHttp.Response>
invokeApi
(String method, String[] pathSegments, Map<String, List<String>> urlParameters, Map<String, String> headers, reactor.util.context.ContextView context) Invokes an API asynchronously without payload that returns a text payload.
-
Field Details
-
API_VERSION
Dapr API used in this client.- See Also:
-
ALPHA_1_API_VERSION
Dapr alpha API used in this client.- See Also:
-
-
Method Details
-
invokeApi
public reactor.core.publisher.Mono<DaprHttp.Response> invokeApi(String method, String[] pathSegments, Map<String, List<String>> urlParameters, Map<String, String> headers, reactor.util.context.ContextView context) Invokes an API asynchronously without payload that returns a text payload.- Parameters:
method
- HTTP method.pathSegments
- Array of path segments ("/a/b/c" maps to ["a", "b", "c"]).urlParameters
- URL parametersheaders
- HTTP headers.context
- OpenTelemetry's Context.- Returns:
- Asynchronous text
-
invokeApi
public reactor.core.publisher.Mono<DaprHttp.Response> invokeApi(String method, String[] pathSegments, Map<String, List<String>> urlParameters, String content, Map<String, String> headers, reactor.util.context.ContextView context) Invokes an API asynchronously that returns a text payload.- Parameters:
method
- HTTP method.pathSegments
- Array of path segments ("/a/b/c" maps to ["a", "b", "c"]).urlParameters
- Parameters in the URLcontent
- payload to be posted.headers
- HTTP headers.context
- OpenTelemetry's Context.- Returns:
- Asynchronous response
-
invokeApi
public reactor.core.publisher.Mono<DaprHttp.Response> invokeApi(String method, String[] pathSegments, Map<String, List<String>> urlParameters, byte[] content, Map<String, String> headers, reactor.util.context.ContextView context) Invokes an API asynchronously that returns a text payload.- Parameters:
method
- HTTP method.pathSegments
- Array of path segments ("/a/b/c" maps to ["a", "b", "c"]).urlParameters
- Parameters in the URLcontent
- payload to be posted.headers
- HTTP headers.context
- OpenTelemetry's Context.- Returns:
- Asynchronous response
-
close
public void close()Shutdown call is not necessary for OkHttpClient.- Specified by:
close
in interfaceAutoCloseable
- See Also:
-
OkHttpClient
-