com.holonplatform.http

## Interface HttpResponse.Builder<T>

- Type Parameters:
    `T` - Payload type
  Enclosing interface:
    HttpResponse<T>

      public static interface HttpResponse.Builder<T>

  Default HttpResponse builder.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `HttpResponse<T>` | `build()` Build the `HttpResponse` instance.
    `HttpResponse.Builder<T>` | `header(String name, List<String> values)` Add a response header, providing the header values.
    `HttpResponse.Builder<T>` | `header(String name, String value)` Add a single value response header.
    `HttpResponse.Builder<T>` | `headers(Map<String,List<String>> headers)` Set response headers.
    `HttpResponse.Builder<T>` | `payload(T payload)` Set the response payload.

- - ### Method Detail

    - #### headers

          HttpResponse.Builder<T> headers(Map<String,List<String>> headers)

      Set response headers. Any previously set header value will be replaced by the new ones.
      Parameters:
        `headers` - The headers to set as a name - values map
      Returns:
        this

    - #### header

          HttpResponse.Builder<T> header(String name,
                                         List<String> values)

      Add a response header, providing the header values.
      Parameters:
        `name` - The header name (not null)
        `values` - The header values
      Returns:
        this

    - #### header

          HttpResponse.Builder<T> header(String name,
                                         String value)

      Add a single value response header.
      Parameters:
        `name` - The header name (not null)
        `value` - The header value
      Returns:
        this

    - #### payload

          HttpResponse.Builder<T> payload(T payload)

      Set the response payload.
      Parameters:
        `payload` - the payload to set
      Returns:
        this

    - #### build

          HttpResponse<T> build()

      Build the `HttpResponse` instance.
      Returns:
        A new `HttpResponse` instance

Copyright © 2019 The Holon Platform. All rights reserved.