Class OptionsMethod
java.lang.Object
org.apache.commons.httpclient.HttpMethodBase
org.apache.commons.httpclient.methods.OptionsMethod
- All Implemented Interfaces:
HttpMethod
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
ConstructorsConstructorDescriptionDeprecated.Method constructor.OptionsMethod
(String uri) Deprecated.Constructor specifying a URI. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Get a list of allowed methods.getName()
Deprecated.Get the name.boolean
Deprecated.Is the specified method allowed ?boolean
Deprecated.only entity enclosing methods set content length headerMethods 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
-
Constructor Details
-
OptionsMethod
public OptionsMethod()Deprecated.Method constructor.- Since:
- 1.0
-
OptionsMethod
Deprecated.Constructor specifying a URI.- Parameters:
uri
- either an absolute or relative URI- Since:
- 1.0
-
-
Method Details
-
getName
Deprecated.Get the name.- Specified by:
getName
in interfaceHttpMethod
- Specified by:
getName
in classHttpMethodBase
- Returns:
- "OPTIONS"
- Since:
- 2.0
-
isAllowed
Deprecated.Is the specified method allowed ?- Parameters:
method
- The method to check.- Returns:
- true if the specified method is allowed.
- Since:
- 1.0
-
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
-