Package io.dapr.client

# Class DaprHttp

java.lang.Object
io.dapr.client.DaprHttp

All Implemented Interfaces:
  `AutoCloseable`

public class DaprHttp extends Object implements AutoCloseable

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`DaprHttp.HttpMethods`
HTTP Methods supported.
`static class`
`DaprHttp.Response`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ALPHA_1_API_VERSION`
Dapr alpha API used in this client.
`static final String`
`API_VERSION`
Dapr API used in this client.

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
Shutdown call is not necessary for HttpClient.
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### API_VERSION

public static final String API_VERSION
Dapr API used in this client.

See Also:
  - Constant Field Values

### ALPHA_1_API_VERSION

public static final String ALPHA_1_API_VERSION
Dapr alpha API used in this client.

See Also:
  - Constant Field Values

## 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 parameters
  `headers` - 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 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[] 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 URL
  `content` - payload to be posted.
  `headers` - HTTP headers.
  `context` - OpenTelemetry's Context.
Returns:
  Asynchronous response

### close

public void close()
Shutdown call is not necessary for HttpClient.

Specified by:
  `close` in interface `AutoCloseable`
See Also:
  - `HttpClient`