org.apache.hc.core5.http.support

## Class BasicResponseBuilder

- java.lang.Object
- - org.apache.hc.core5.http.support.AbstractMessageBuilder<T>
  - - org.apache.hc.core5.http.support.AbstractResponseBuilder<BasicHttpResponse>
    - - org.apache.hc.core5.http.support.BasicResponseBuilder

-     public class BasicResponseBuilder
      extends AbstractResponseBuilder<BasicHttpResponse>

  Builder for `BasicHttpResponse` instances.
  Since:
    5.1

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BasicResponseBuilder(int status)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `BasicResponseBuilder` | `addHeader(Header header)`
    `BasicResponseBuilder` | `addHeader(String name, String value)`
    `BasicHttpResponse` | `build()`
    `static BasicResponseBuilder` | `copy(HttpResponse response)`
    `static BasicResponseBuilder` | `create(int status)`
    `BasicResponseBuilder` | `removeHeader(Header header)`
    `BasicResponseBuilder` | `removeHeaders(String name)`
    `BasicResponseBuilder` | `setHeader(Header header)`
    `BasicResponseBuilder` | `setHeader(String name, String value)`
    `BasicResponseBuilder` | `setHeaders(Header... headers)`
    `BasicResponseBuilder` | `setVersion(ProtocolVersion version)`
    `String` | `toString()`

    - ### Methods inherited from class org.apache.hc.core5.http.support.AbstractResponseBuilder

      `getStatus, setStatus`

    - ### Methods inherited from class org.apache.hc.core5.http.support.AbstractMessageBuilder

      `digest, getFirstHeader, getFirstHeaders, getHeaders, getHeaders, getLastHeader, getVersion, setHeaders`

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

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

- - ### Constructor Detail

    - #### BasicResponseBuilder

          protected BasicResponseBuilder(int status)

  - ### Method Detail

    - #### create

          public static BasicResponseBuilder create(int status)

    - #### copy

          public static BasicResponseBuilder copy(HttpResponse response)

    - #### setVersion

          public BasicResponseBuilder setVersion(ProtocolVersion version)

      Overrides:
        `setVersion` in class `AbstractResponseBuilder<BasicHttpResponse>`

    - #### setHeaders

          public BasicResponseBuilder setHeaders(Header... headers)

      Overrides:
        `setHeaders` in class `AbstractResponseBuilder<BasicHttpResponse>`

    - #### addHeader

          public BasicResponseBuilder addHeader(Header header)

      Overrides:
        `addHeader` in class `AbstractResponseBuilder<BasicHttpResponse>`

    - #### addHeader

          public BasicResponseBuilder addHeader(String name,
                                                String value)

      Overrides:
        `addHeader` in class `AbstractResponseBuilder<BasicHttpResponse>`

    - #### removeHeader

          public BasicResponseBuilder removeHeader(Header header)

      Overrides:
        `removeHeader` in class `AbstractResponseBuilder<BasicHttpResponse>`

    - #### removeHeaders

          public BasicResponseBuilder removeHeaders(String name)

      Overrides:
        `removeHeaders` in class `AbstractResponseBuilder<BasicHttpResponse>`

    - #### setHeader

          public BasicResponseBuilder setHeader(Header header)

      Overrides:
        `setHeader` in class `AbstractResponseBuilder<BasicHttpResponse>`

    - #### setHeader

          public BasicResponseBuilder setHeader(String name,
                                                String value)

      Overrides:
        `setHeader` in class `AbstractResponseBuilder<BasicHttpResponse>`

    - #### build

          public BasicHttpResponse build()

      Specified by:
        `build` in class `AbstractResponseBuilder<BasicHttpResponse>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.