@Header(value="Allow") public class Allow extends BasicCsvArrayHeader
Valid methods for a specified resource. To be used for a 405 Method not allowed.
Allow: GET, HEAD
Allow = "Allow" ":" #Method
Example of use:
Allow: GET, HEAD, PUT
This field cannot prevent a client from trying other methods. However, the indications given by the Allow header field value SHOULD be followed.
The actual set of allowed methods is defined by the origin server at the time of each request.
The Allow header field MAY be provided with a PUT request to recommend the methods to be supported by the new or modified resource.
The server is not required to support these methods and SHOULD include an Allow header in the response giving the actual supported methods.
A proxy MUST NOT modify the Allow header field even if it does not understand all the methods specified, since the user agent might have other means of communicating with the origin server.
Constructor and Description |
---|
Allow(Object value)
Constructor.
|
Allow(String value)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static Allow |
of(Object value)
Convenience creator.
|
static Allow |
of(Supplier<?> value)
Convenience creator using supplier.
|
asList, assertList, contains, containsIc, getValue, of, of
assertName, assertValue, canCast, cast, eqIC, equals, getElements, getName, getRawValue, hashCode, isSupplier, of, ofPair, toString, unwrap
public Allow(Object value)
value
- The header value.
Collection
- Converted to Supplier
of anything on this list.
public static Allow of(Object value)
value
- The header value.
Collection
- Converted to public static Allow of(Supplier<?> value)
Header value is re-evaluated on each call to BasicCsvArrayHeader.getValue()
.
value
- The header value supplier.
Collection
- Converted to Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.