Class OutgoingHttpMetadata.Builder

java.lang.Object
io.quarkus.reactivemessaging.http.runtime.OutgoingHttpMetadata.Builder
Enclosing class:
OutgoingHttpMetadata

public static final class OutgoingHttpMetadata.Builder extends Object
OutgoingHttpMetadata buiilder
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • addQueryParameter

      public OutgoingHttpMetadata.Builder addQueryParameter(String paramName, String paramValue)
      add a query parameter
      Parameters:
      paramName - name of the query parameter
      paramValue - value of the query parameter
      Returns:
      this
    • replaceQueryParameter

      public OutgoingHttpMetadata.Builder replaceQueryParameter(String paramName, String paramValue)
      add a query parameter. If there is a previous parameter with the same name, it will be removed
      Parameters:
      paramName - name of the query parameter
      paramValue - value of the query parameter
      Returns:
      this
    • addHeader

      public OutgoingHttpMetadata.Builder addHeader(String headerName, String headerValue)
      add a HTTP header
      Parameters:
      headerName - name of the header
      headerValue - value of the header
      Returns:
      this
    • replaceHeader

      public OutgoingHttpMetadata.Builder replaceHeader(String headerName, String headerValue)
      add a HTTP header. If there is a previous header with the same name, it will be removed
      Parameters:
      headerName - name of the header
      headerValue - value of the header
      Returns:
      this
    • addPathParameter

      public OutgoingHttpMetadata.Builder addPathParameter(String parameter, String value)
      Add a path parameter. To use parameters, it is needed to add a placeholder in the URL of the connector in the form of {parameterName}
      Parameters:
      parameter - path parameter name, should correspond to a placeholder like {parameter} in the URL
      value - path parameter value
      Returns:
      this
    • build

      public OutgoingHttpMetadata build()
      build the metadata object
      Returns:
      metadata