org.apache.commons.httpclient.methods
Class OptionsMethod
- HttpMethod
public class OptionsMethod
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.
Version:
- Remy Maucherat
- Mike Bowler
- Jeff Dever
- 1.0
abort, addCookieRequestHeader, addHostRequestHeader, addProxyConnectionHeader, addRequestHeader, addRequestHeader, addRequestHeaders, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, generateRequestLine, getAuthenticationRealm, getContentCharSet, getDoAuthentication, getEffectiveVersion, getFollowRedirects, getHostAuthState, getHostConfiguration, getMethodRetryHandler, getName, getParams, getPath, getProxyAuthState, getProxyAuthenticationRealm, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestHeader, getRequestHeaderGroup, getRequestHeaders, getRequestHeaders, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaderGroup, getResponseHeaders, getResponseHeaders, getResponseStream, getResponseTrailerHeaderGroup, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isAborted, isConnectionCloseForced, isHttp11, isRequestSent, isStrictMode, processResponseBody, processResponseHeaders, processStatusLine, readResponse, readResponseBody, readResponseHeaders, readStatusLine, recycle, releaseConnection, removeRequestHeader, removeRequestHeader, responseBodyConsumed, setConnectionCloseForced, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setParams, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setResponseStream, setStrictMode, setURI, shouldCloseConnection, validate, writeRequest, writeRequestBody, writeRequestHeaders, writeRequestLine |
OptionsMethod
public OptionsMethod()
Method constructor.
- 1.0
OptionsMethod
public OptionsMethod(String uri)
Constructor specifying a URI.
uri - either an absolute or relative URI
- 1.0
getAllowedMethods
public Enumeration getAllowedMethods()
Get a list of allowed methods.
- An enumeration of all the allowed methods.
- 1.0
isAllowed
public boolean isAllowed(String method)
Is the specified method allowed ?
method - The method to check.
- true if the specified method is allowed.
- 1.0
needContentLength
public boolean needContentLength()
only entity enclosing methods set content length header
Return true if the method needs a content-length header in the request.
- true if a content-length header will be expected by the server
- 1.0
processResponseHeaders
protected void processResponseHeaders(HttpState state,
HttpConnection conn)
This implementation will parse the Allow header to obtain
the set of methods supported by the resource identified by the Request-URI.
- processResponseHeaders in interface HttpMethodBase
state - the state information associated with this methodconn - the connection used to execute
this HTTP method
- 2.0
OptionsMethod, OptionsMethod
Copyright (c) 1999-2005 - Apache Software Foundation