Class OptionsMethod
- java.lang.Object
-
- org.apache.commons.httpclient.HttpMethodBase
-
- org.apache.commons.httpclient.methods.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 Summary
Constructors Constructor Description OptionsMethod()
Deprecated.Method constructor.OptionsMethod(java.lang.String uri)
Deprecated.Constructor specifying a URI.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Enumeration
getAllowedMethods()
Deprecated.Get a list of allowed methods.java.lang.String
getName()
Deprecated.Get the name.boolean
isAllowed(java.lang.String method)
Deprecated.Is the specified method allowed ?boolean
needContentLength()
Deprecated.only entity enclosing methods set content length header-
Methods inherited from class org.apache.commons.httpclient.HttpMethodBase
abort, addRequestHeader, addRequestHeader, addResponseFooter, execute, getAuthenticationRealm, getDoAuthentication, getEffectiveVersion, getFollowRedirects, getHostAuthState, getHostConfiguration, getMethodRetryHandler, getParams, getPath, getProxyAuthenticationRealm, getProxyAuthState, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestHeader, getRequestHeaders, getRequestHeaders, getResponseBody, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaders, getResponseHeaders, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isAborted, isHttp11, isRequestSent, isStrictMode, recycle, releaseConnection, removeRequestHeader, removeRequestHeader, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setParams, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setStrictMode, setURI, validate
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Deprecated.Get the name.- Specified by:
getName
in interfaceHttpMethod
- Specified by:
getName
in classHttpMethodBase
- 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 headerReturn 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
-
-