All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.juneau.http.Allow Maven / Gradle / Ivy

There is a newer version: 9.0.1
Show newest version
// ***************************************************************************************************************************
// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
// * with the License.  You may obtain a copy of the License at                                                              *
// *                                                                                                                         *
// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
// *                                                                                                                         *
// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
// * specific language governing permissions and limitations under the License.                                              *
// ***************************************************************************************************************************
package org.apache.juneau.http;

/**
 * Represents a parsed Allow HTTP response header.
 *
 * 

* Valid methods for a specified resource. To be used for a 405 Method not allowed. * *

Example
*

* Allow: GET, HEAD *

* *
RFC2616 Specification
* * The Allow entity-header field lists the set of methods supported by the resource identified by the Request-URI. * The purpose of this field is strictly to inform the recipient of valid methods associated with the resource. * An Allow header field MUST be present in a 405 (Method Not Allowed) response. * *

* 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. * *

Additional Information
* */ public final class Allow extends HeaderStringArray { /** * Returns a parsed Allow header. * * @param value The Allow header string. * @return The parsed Allow header, or null if the string was null. */ public static Allow forString(String value) { if (value == null) return null; return new Allow(value); } private Allow(String value) { super(value); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy