Class IfUnmodifiedSince
- All Implemented Interfaces:
Serializable
,Cloneable
,Header
,NameValuePair
Only send the response if the entity has not been modified since a specific time.
Example
If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
RFC2616 Specification
The If-Unmodified-Since request-header field is used with a method to make it conditional. If the requested resource has not been modified since the time specified in this field, the server SHOULD perform the requested operation as if the If-Unmodified-Since header were not present.If the requested variant has been modified since the specified time, the server MUST NOT perform the requested operation, and MUST return a 412 (Precondition Failed).
If-Unmodified-Since = "If-Unmodified-Since" ":" HTTP-date
An example of the field is:
If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
If the request normally (i.e., without the If-Unmodified-Since header) would result in anything other than a 2xx or 412 status, the If-Unmodified-Since header SHOULD be ignored.
If the specified date is invalid, the header is ignored.
The result of a request having both an If-Unmodified-Since header field and either an If-None-Match or an If-Modified-Since header fields is undefined by this specification.
See Also:
-
Constructor Summary
ConstructorDescriptionIfUnmodifiedSince
(String value) Constructor.IfUnmodifiedSince
(ZonedDateTime value) Constructor.IfUnmodifiedSince
(Supplier<ZonedDateTime> value) Constructor with delayed value. -
Method Summary
Modifier and TypeMethodDescriptionstatic IfUnmodifiedSince
Static creator.static IfUnmodifiedSince
of
(ZonedDateTime value) Static creator.static IfUnmodifiedSince
of
(Supplier<ZonedDateTime> value) Static creator with delayed value.Methods inherited from class org.apache.juneau.http.header.BasicDateHeader
assertZonedDateTime, asZonedDateTime, getValue, of, of, of, orElse, toZonedDateTime
Methods inherited from class org.apache.juneau.http.header.BasicHeader
assertName, assertStringValue, asString, equals, equalsIgnoreCase, get, getElements, getName, hashCode, isNotEmpty, isPresent, of, of, orElse, toString
-
Constructor Details
-
IfUnmodifiedSince
Constructor.- Parameters:
value
- The header value.
Must be an RFC-1123 formated string (e.g."Sat, 29 Oct 1994 19:43:31 GMT" ).
Can benull .
-
IfUnmodifiedSince
Constructor.- Parameters:
value
- The header value.
Can benull .
-
IfUnmodifiedSince
Constructor with delayed value.Header value is re-evaluated on each call to
BasicDateHeader.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .
-
-
Method Details
-
of
Static creator.- Parameters:
value
- The header value.
Must be an RFC-1123 formated string (e.g."Sat, 29 Oct 1994 19:43:31 GMT" ).
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
of
Static creator.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
of
Static creator with delayed value.Header value is re-evaluated on each call to
BasicDateHeader.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-