B
- the builder subclasspublic static interface ResponseEntity.HeadersBuilder<B extends ResponseEntity.HeadersBuilder<B>>
Modifier and Type | Method and Description |
---|---|
B |
allow(HttpMethod... allowedMethods)
Set the set of allowed
HTTP methods , as specified
by the Allow header. |
ResponseEntity<Void> |
build()
Build the response entity with no body.
|
B |
eTag(String eTag)
Set the entity tag of the body, as specified by the
ETag header. |
B |
header(String headerName,
String... headerValues)
Add the given, single header value under the given name.
|
B |
lastModified(long lastModified)
Set the time the resource was last changed, as specified by the
Last-Modified header. |
B |
location(URI location)
Set the location of a resource, as specified by the
Location header. |
B header(String headerName, String... headerValues)
headerName
- the header nameheaderValues
- the header value(s)HttpHeaders.add(String, String)
B allow(HttpMethod... allowedMethods)
HTTP methods
, as specified
by the Allow
header.allowedMethods
- the allowed methodsHttpHeaders.setAllow(Set)
B eTag(String eTag)
ETag
header.eTag
- the new entity tagHttpHeaders.setETag(String)
B lastModified(long lastModified)
Last-Modified
header.
The date should be specified as the number of milliseconds since January 1, 1970 GMT.
lastModified
- the last modified dateHttpHeaders.setLastModified(long)
B location(URI location)
Location
header.location
- the locationHttpHeaders.setLocation(URI)
ResponseEntity<Void> build()
ResponseEntity.BodyBuilder.body(Object)