Class DaprHttp

java.lang.Object
io.dapr.client.DaprHttp
All Implemented Interfaces:
Closeable, AutoCloseable

public class DaprHttp
extends Object
implements Closeable
  • Field Details

  • Method Details

    • invokeApi

      public reactor.core.publisher.Mono<DaprHttp.Response> invokeApi​(String method, String urlString, Map<String,​String> urlParameters, Map<String,​String> headers, io.grpc.Context context)
      Invokes an API asynchronously without payload that returns a text payload.
      Parameters:
      method - HTTP method.
      urlString - url as String.
      urlParameters - URL parameters
      headers - HTTP headers.
      context - OpenTelemetry's Context.
      Returns:
      Asynchronous text
    • invokeApi

      public reactor.core.publisher.Mono<DaprHttp.Response> invokeApi​(String method, String urlString, Map<String,​String> urlParameters, String content, Map<String,​String> headers, io.grpc.Context context)
      Invokes an API asynchronously that returns a text payload.
      Parameters:
      method - HTTP method.
      urlString - url as String.
      urlParameters - Parameters in the URL
      content - 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 urlString, Map<String,​String> urlParameters, byte[] content, Map<String,​String> headers, io.grpc.Context context)
      Invokes an API asynchronously that returns a text payload.
      Parameters:
      method - HTTP method.
      urlString - url as String.
      urlParameters - Parameters in the URL
      content - payload to be posted.
      headers - HTTP headers.
      context - OpenTelemetry's Context.
      Returns:
      Asynchronous response
    • close

      public void close() throws IOException
      Shutdown call is not necessary for OkHttpClient.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
      See Also:
      OkHttpClient