Package org.apache.juneau.http.header
Class Location
java.lang.Object
org.apache.juneau.http.header.BasicHeader
org.apache.juneau.http.header.BasicUriHeader
org.apache.juneau.http.header.Location
- All Implemented Interfaces:
- Serializable,- Cloneable,- Header,- NameValuePair
Represents a parsed Location  HTTP response header.
 
Used in redirection, or when a new resource has been created.
Example
Location: http://www.w3.org/pub/WWW/People.html
RFC2616 Specification
The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI.Location = "Location" ":" absoluteURI
An example is:
Location: http://www.w3.org/pub/WWW/People.html
Note: The Content-Location header field (section 14.14) differs from Location in that the Content-Location identifies the original location of the entity enclosed in the request. It is therefore possible for a response to contain header fields for both Location and Content-Location. Also see section 13.10 for cache requirements of some methods.
See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class org.apache.juneau.http.header.BasicUriHeaderasUri, getValue, of, of, of, orElse, toUriMethods inherited from class org.apache.juneau.http.header.BasicHeaderassertName, assertStringValue, asString, equals, equalsIgnoreCase, get, getElements, getName, hashCode, isNotEmpty, isPresent, of, of, orElse, toString
- 
Constructor Details- 
LocationConstructor.- Parameters:
- value- The header value.
 Must be parsable by- URI.create(String).
 Can be- null .
 
- 
LocationConstructor.- Parameters:
- value- The header value.
 Can be- null .
 
- 
LocationConstructor with delayed value.Header value is re-evaluated on each call to BasicUriHeader.getValue().- Parameters:
- value- The supplier of the header value.
 Can be- null .
 
 
- 
- 
Method Details- 
ofStatic creator.- Parameters:
- value- The header value.
 Must be parsable by- URI.create(String).
 Can be- null .
- Returns:
- A new header bean, or null if the value isnull .
 
- 
ofStatic creator.- Parameters:
- value- The header value.
 Can be- null .
- Returns:
- A new header bean, or null if the value isnull .
 
- 
ofStatic creator with delayed value.Header value is re-evaluated on each call to BasicUriHeader.getValue().- Parameters:
- value- The supplier of the header value.
 Can be- null .
- Returns:
- A new header bean, or null if the value isnull .
 
 
-