public static class HttpResponse.Builder
extends java.lang.Object
HttpResponse
to create an immutable instance.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
build()
Builds an instance of
HttpResponse |
HttpResponse.Builder |
content(java.io.InputStream content)
Sets the content input stream.
|
HttpResponse.Builder |
header(java.lang.String key,
java.lang.String value)
Adds a key-value header to the request.
|
HttpResponse.Builder |
statusCode(int statusCode)
Sets the status code, such as 200, 204, 400, 500, etc
|
HttpResponse.Builder |
statusText(java.lang.String statusText)
Sets the status text.
|
public HttpResponse.Builder statusText(java.lang.String statusText)
statusText
- status textpublic HttpResponse.Builder statusCode(int statusCode)
statusCode
- status codepublic HttpResponse.Builder content(java.io.InputStream content)
content
- input streampublic HttpResponse.Builder header(java.lang.String key, java.lang.String value)
key
- header keyvalue
- header valuepublic HttpResponse build()
HttpResponse
HttpResponse
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.