org.apache.hc.client5.http.async.methods

## Class SimpleResponseBuilder

- java.lang.Object
- - org.apache.hc.core5.http.support.AbstractMessageBuilder<T>
  - - org.apache.hc.core5.http.support.AbstractResponseBuilder<SimpleHttpResponse>
    - - org.apache.hc.client5.http.async.methods.SimpleResponseBuilder

    public class SimpleResponseBuilder
    extends AbstractResponseBuilder<SimpleHttpResponse>

Builder for `SimpleHttpResponse` instances.

Since:
  5.1

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`SimpleResponseBuilder` `addHeader(Header header)`
`SimpleResponseBuilder` `addHeader(String name, String value)`
`SimpleHttpResponse` `build()`
`static SimpleResponseBuilder` `copy(SimpleHttpResponse response)`
`static SimpleResponseBuilder` `create(int status)`
`protected void` `digest(SimpleHttpResponse response)`
`SimpleBody` `getBody()`
`SimpleResponseBuilder` `removeHeader(Header header)`
`SimpleResponseBuilder` `removeHeaders(String name)`
`SimpleResponseBuilder` `setBody(byte[] content, ContentType contentType)`
`SimpleResponseBuilder` `setBody(SimpleBody body)`
`SimpleResponseBuilder` `setBody(String content, ContentType contentType)`
`SimpleResponseBuilder` `setHeader(Header header)`
`SimpleResponseBuilder` `setHeader(String name, String value)`
`SimpleResponseBuilder` `setHeaders(Header... headers)`
`SimpleResponseBuilder` `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`

### Method Detail

#### create

    public static SimpleResponseBuilder create(int status)

#### copy

    public static SimpleResponseBuilder copy(SimpleHttpResponse response)

#### digest

    protected void digest(SimpleHttpResponse response)

#### setVersion

    public SimpleResponseBuilder setVersion(ProtocolVersion version)

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

#### setHeaders

    public SimpleResponseBuilder setHeaders(Header... headers)

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

#### addHeader

    public SimpleResponseBuilder addHeader(Header header)

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

#### addHeader

    public SimpleResponseBuilder addHeader(String name,
                                           String value)

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

#### removeHeader

    public SimpleResponseBuilder removeHeader(Header header)

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

#### removeHeaders

    public SimpleResponseBuilder removeHeaders(String name)

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

#### setHeader

    public SimpleResponseBuilder setHeader(Header header)

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

#### setHeader

    public SimpleResponseBuilder setHeader(String name,
                                           String value)

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

#### getBody

    public SimpleBody getBody()

#### setBody

    public SimpleResponseBuilder setBody(SimpleBody body)

#### setBody

    public SimpleResponseBuilder setBody(String content,
                                         ContentType contentType)

#### setBody

    public SimpleResponseBuilder setBody(byte[] content,
                                         ContentType contentType)

#### build

    public SimpleHttpResponse build()

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

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`