@Header(value="Content-Location") public class ContentLocation extends BasicUriHeader
An alternate location for the returned data.
Content-Location: /index.htm
Content-Location = "Content-Location" ":" ( absoluteURI | relativeURI )
The value of Content-Location also defines the base URI for the entity.
The Content-Location value is not a replacement for the original requested URI; it is only a statement of the location of the resource corresponding to this particular entity at the time of the request. Future requests MAY specify the Content-Location URI as the request- URI if the desire is to identify the source of that particular entity.
A cache cannot assume that an entity with a Content-Location different from the URI used to retrieve it can be used to respond to later requests on that Content-Location URI. However, the Content- Location can be used to differentiate between multiple entities retrieved from a single requested resource, as described in section 13.6.
If the Content-Location is a relative URI, the relative URI is interpreted relative to the Request-URI.
The meaning of the Content-Location header in PUT or POST requests is undefined; servers are free to ignore it in those cases.
Constructor and Description |
---|
ContentLocation(Object value)
Constructor
|
ContentLocation(String value)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static ContentLocation |
of(Object value)
Convenience creator.
|
static ContentLocation |
of(Supplier<?> value)
Convenience creator using supplier.
|
asURI, of, of
assertName, assertValue, canCast, cast, eqIC, equals, getElements, getName, getRawValue, getValue, hashCode, isSupplier, of, ofPair, toString, unwrap
public ContentLocation(Object value)
public ContentLocation(String value)
value
- The header value.public static ContentLocation of(Object value)
value
- The header value.
String
ContentLocation
object.public static ContentLocation of(Supplier<?> value)
Header value is re-evaluated on each call to BasicHeader.getValue()
.
value
- The header value supplier.
String
ContentLocation
object.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.