Class OptionsMethod

  • All Implemented Interfaces:
    HttpMethod

    public class OptionsMethod
    extends HttpMethodBase
    Implements the HTTP OPTIONS method.

    The HTTP OPTIONS method is defined in section 9.2 of RFC2616:

    The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI. This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.

    Since:
    1.0
    • Constructor Detail

      • OptionsMethod

        public OptionsMethod()
        Method constructor.
        Since:
        1.0
      • OptionsMethod

        public OptionsMethod​(java.lang.String uri)
        Constructor specifying a URI.
        Parameters:
        uri - either an absolute or relative URI
        Since:
        1.0
    • Method Detail

      • isAllowed

        public boolean isAllowed​(java.lang.String method)
        Is the specified method allowed ?
        Parameters:
        method - The method to check.
        Returns:
        true if the specified method is allowed.
        Since:
        1.0
      • getAllowedMethods

        public java.util.Enumeration getAllowedMethods()
        Get a list of allowed methods.
        Returns:
        An enumeration of all the allowed methods.
        Since:
        1.0
      • needContentLength

        public boolean needContentLength()
        Deprecated.
        only entity enclosing methods set content length header
        Return true if the method needs a content-length header in the request.
        Returns:
        true if a content-length header will be expected by the server
        Since:
        1.0