org.apache.commons.httpclient.methods
Class OptionsMethod

java.lang.Object
  |
  +--org.apache.commons.httpclient.HttpMethodBase
        |
        +--org.apache.commons.httpclient.methods.OptionsMethod
All Implemented Interfaces:
HttpMethod
Direct Known Subclasses:
UrlOptionsMethod

public class OptionsMethod
extends HttpMethodBase

OPTIONS Method.

Since:
1.0
Author:
Remy Maucherat

Fields inherited from class org.apache.commons.httpclient.HttpMethodBase
USER_AGENT
 
Constructor Summary
OptionsMethod()
          Method constructor.
OptionsMethod(java.lang.String path)
          Method constructor.
 
Method Summary
 java.util.Enumeration getAllowedMethods()
          Get a list of allowed methods.
 java.lang.String getName()
          Obtain the name of this method, suitable for use in the "request line", for example GET or POST.
 boolean isAllowed(java.lang.String method)
          Is the specified method allowed ?
 boolean needContentLength()
          Return true if the method needs a content-length header in the request.
protected  void processResponseHeaders(HttpState state, HttpConnection conn)
          When this method is invoked, the response headers map will have been populated with the response headers (in other words, readResponseHeaders(HttpState,HttpConnection) will have been invoked).
 
Methods inherited from class org.apache.commons.httpclient.HttpMethodBase
addAuthorizationRequestHeader, addContentLengthRequestHeader, addCookieRequestHeader, addHostRequestHeader, addProxyAuthorizationRequestHeader, addRequestHeader, addRequestHeader, addRequestHeaders, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, generateRequestLine, getFollowRedirects, getPath, getQueryString, getRequestContentLength, getRequestHeader, getRequestHeaders, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaders, getStatusCode, getStatusText, hasBeenUsed, isHttp11, isStrictMode, processResponseBody, processStatusLine, readResponse, readResponseBody, readResponseHeaders, readStatusLine, recycle, removeRequestHeader, setFollowRedirects, setHttp11, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setResponseStream, setStrictMode, validate, writeRequest, writeRequestBody, writeRequestHeaders, writeRequestLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionsMethod

public OptionsMethod()
Method constructor.
Since:
1.0

OptionsMethod

public OptionsMethod(java.lang.String path)
Method constructor.
Since:
1.0
Method Detail

getName

public java.lang.String getName()
Description copied from class: HttpMethodBase
Obtain the name of this method, suitable for use in the "request line", for example GET or POST.
Overrides:
getName in class HttpMethodBase
Since:
2.0

isAllowed

public boolean isAllowed(java.lang.String method)
Is the specified method allowed ?
Since:
1.0

getAllowedMethods

public java.util.Enumeration getAllowedMethods()
Get a list of allowed methods.
Since:
1.0

processResponseHeaders

protected void processResponseHeaders(HttpState state,
                                      HttpConnection conn)
Description copied from class: HttpMethodBase
When this method is invoked, the response headers map will have been populated with the response headers (in other words, readResponseHeaders(HttpState,HttpConnection) will have been invoked).

This implementation will handle the Set-Cookie and Set-Cookie2 headers, if any, adding the relevant cookies to the given HttpState.

Subclasses may want to override this method to specially process additional headers, and/or invoke this method (via super) to process the Set-Cookie and Set-Cookie2 headers.

Overrides:
processResponseHeaders in class HttpMethodBase
Since:
2.0

needContentLength

public boolean needContentLength()
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


Copyright (c) 2001 - Apache Software Foundation