Package io.dapr.client.domain

# Class HttpExtension

java.lang.Object
io.dapr.client.domain.HttpExtension

public final class HttpExtension extends Object
HTTP Extension class. This class is only needed if the app you are calling is listening on HTTP. It contains properties that represent data that may be populated for an HTTP receiver.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final HttpExtension`
  `CONNECT`
  Convenience HttpExtension object for the `DaprHttp.HttpMethods.CONNECT` Verb with empty queryString.
  `static final HttpExtension`
  `DELETE`
  Convenience HttpExtension object for the `DaprHttp.HttpMethods.DELETE` Verb with empty queryString.
  `static final HttpExtension`
  `GET`
  Convenience HttpExtension object for the `DaprHttp.HttpMethods.GET` Verb with empty queryString.
  `static final HttpExtension`
  `HEAD`
  Convenience HttpExtension object for the `DaprHttp.HttpMethods.HEAD` Verb with empty queryString.
  `static final HttpExtension`
  `NONE`
  Convenience HttpExtension object for `DaprHttp.HttpMethods.NONE` with empty queryString.
  `static final HttpExtension`
  `OPTIONS`
  Convenience HttpExtension object for the `DaprHttp.HttpMethods.OPTIONS` Verb with empty queryString.
  `static final HttpExtension`
  `PATCH`
  Convenience HttpExtension object for the `DaprHttp.HttpMethods.PATCH` Verb with empty queryString.
  `static final HttpExtension`
  `POST`
  Convenience HttpExtension object for the `DaprHttp.HttpMethods.POST` Verb with empty queryString.
  `static final HttpExtension`
  `PUT`
  Convenience HttpExtension object for the `DaprHttp.HttpMethods.PUT` Verb with empty queryString.
  `static final HttpExtension`
  `TRACE`
  Convenience HttpExtension object for the `DaprHttp.HttpMethods.TRACE` Verb with empty queryString.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HttpExtension(DaprHttp.HttpMethods method)`
  Construct a HttpExtension object.
  `HttpExtension(DaprHttp.HttpMethods method, Map<String,List<String>> queryParams, Map<String,String> headers)`
  Construct a HttpExtension object.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `encodeQueryString()`
  Encodes the query string for the HTTP request.
  `Map<String,String>`
  `getHeaders()`
  `DaprHttp.HttpMethods`
  `getMethod()`
  `Map<String,List<String>>`
  `getQueryParams()`

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

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

- ## Field Details

  - ### NONE

    public static final HttpExtension NONE
    Convenience HttpExtension object for `DaprHttp.HttpMethods.NONE` with empty queryString.

  - ### GET

    public static final HttpExtension GET
    Convenience HttpExtension object for the `DaprHttp.HttpMethods.GET` Verb with empty queryString.

  - ### PUT

    public static final HttpExtension PUT
    Convenience HttpExtension object for the `DaprHttp.HttpMethods.PUT` Verb with empty queryString.

  - ### POST

    public static final HttpExtension POST
    Convenience HttpExtension object for the `DaprHttp.HttpMethods.POST` Verb with empty queryString.

  - ### DELETE

    public static final HttpExtension DELETE
    Convenience HttpExtension object for the `DaprHttp.HttpMethods.DELETE` Verb with empty queryString.

  - ### PATCH

    public static final HttpExtension PATCH
    Convenience HttpExtension object for the `DaprHttp.HttpMethods.PATCH` Verb with empty queryString.

  - ### HEAD

    public static final HttpExtension HEAD
    Convenience HttpExtension object for the `DaprHttp.HttpMethods.HEAD` Verb with empty queryString.

  - ### CONNECT

    public static final HttpExtension CONNECT
    Convenience HttpExtension object for the `DaprHttp.HttpMethods.CONNECT` Verb with empty queryString.

  - ### OPTIONS

    public static final HttpExtension OPTIONS
    Convenience HttpExtension object for the `DaprHttp.HttpMethods.OPTIONS` Verb with empty queryString.

  - ### TRACE

    public static final HttpExtension TRACE
    Convenience HttpExtension object for the `DaprHttp.HttpMethods.TRACE` Verb with empty queryString.

- ## Constructor Details

  - ### HttpExtension

    public HttpExtension(DaprHttp.HttpMethods method, Map<String,List<String>> queryParams, Map<String,String> headers)
    Construct a HttpExtension object.
    Parameters:
      `method` - Required value denoting the HttpMethod.
      `queryParams` - map for the query parameters the HTTP call.
      `headers` - map to set HTTP headers.
    Throws:
      `IllegalArgumentException` - on null method or queryString.
    See Also:
      - `for supported methods.`

  - ### HttpExtension

    public HttpExtension(DaprHttp.HttpMethods method)
    Construct a HttpExtension object.
    Parameters:
      `method` - Required value denoting the HttpMethod.
    Throws:
      `IllegalArgumentException` - on null method or queryString.
    See Also:
      - `for supported methods.`

- ## Method Details

  - ### getMethod

    public DaprHttp.HttpMethods getMethod()

  - ### getQueryParams

    public Map<String,List<String>> getQueryParams()

  - ### getHeaders

    public Map<String,String> getHeaders()

  - ### encodeQueryString

    public String encodeQueryString()
    Encodes the query string for the HTTP request.
    Returns:
      Encoded HTTP query string.