public static interface HttpResponseMessage.Builder
| Modifier and Type | Method and Description |
|---|---|
HttpResponseMessage.Builder |
body(Object body)
Sets the body of the HTTP response.
|
HttpResponseMessage |
build()
Creates an instance of HttpMessageResponse with the values configured in this builder.
|
HttpResponseMessage.Builder |
header(String key,
String value)
Adds a (key, value) header to the response.
|
HttpResponseMessage.Builder |
status(HttpStatusType status)
Sets the status code to be used in the HttpResponseMessage object.
|
HttpResponseMessage.Builder status(HttpStatusType status)
HttpStatus, or you can
create a custom status code using HttpStatusType.custom(int).status - An HTTP status code representing the outcome of the HTTP request.HttpResponseMessage.Builder header(String key, String value)
key - The key of the header value.value - The value of the header value.HttpResponseMessage.Builder body(Object body)
body - The body of the HTTP responseHttpResponseMessage build()
Copyright © 2020. All rights reserved.