Class OptionsMethod

  • All Implemented Interfaces:
    HttpMethod

    @Deprecated
    public class OptionsMethod
    extends HttpMethodBase
    Deprecated.
    Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.
    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()
        Deprecated.
        Method constructor.
        Since:
        1.0
      • OptionsMethod

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

      • getName

        public java.lang.String getName()
        Deprecated.
        Get the name.
        Specified by:
        getName in interface HttpMethod
        Specified by:
        getName in class HttpMethodBase
        Returns:
        "OPTIONS"
        Since:
        2.0
      • isAllowed

        public boolean isAllowed​(java.lang.String method)
        Deprecated.
        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()
        Deprecated.
        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