Example usage for Java org.apache.commons.httpclient HttpMethodBase fields, constructors, methods, implement or subclass
The text is from its open source code.
HttpMethodBase() No-arg constructor. | |
HttpMethodBase(String uri) Constructor specifying a URI. |
void | abort() Aborts the execution of this method. |
void | addRequestHeader(Header header) Adds the specified request header, NOT overwriting any previous value. |
void | addRequestHeader(String headerName, String headerValue) Adds the specified request header, NOT overwriting any previous value. |
Class> | getClass() Returns the runtime class of this Object . |
AuthState | getHostAuthState() Returns the target host AuthState authentication state |
HostConfiguration | getHostConfiguration() Returns the HostConfiguration host configuration . |
String | getName() Obtains the name of the HTTP method as used in the HTTP request line, for example "GET" or "POST". |
HttpMethodParams | getParams() Returns HttpMethodParams HTTP protocol parameters associated with this method. |
String | getPath() Gets the path of this HTTP method. |
AuthState | getProxyAuthState() Returns the proxy AuthState authentication state |
String | getQueryString() Gets the query string of this HTTP method. |
String | getRequestCharSet() Returns the character encoding of the request from the Content-Type header. |
Header | getRequestHeader(String headerName) Returns the specified request header. |
Header[] | getRequestHeaders() Returns an array of the requests headers that the HTTP method currently has |
byte[] | getResponseBody() Returns the response body of the HTTP method, if any, as an array of bytes. |
byte[] | getResponseBody(int maxlen) Returns the response body of the HTTP method, if any, as an array of bytes. |
InputStream | getResponseBodyAsStream() Returns the response body of the HTTP method, if any, as an InputStream . |
String | getResponseBodyAsString() Returns the response body of the HTTP method, if any, as a String . |
String | getResponseBodyAsString(int maxlen) Returns the response body of the HTTP method, if any, as a String . |
String | getResponseCharSet() Returns the character encoding of the response from the Content-Type header. |
long | getResponseContentLength() Return the length (in bytes) of the response body, as specified in a Content-Length header. |
Header | getResponseHeader(String headerName) Gets the response header associated with the given name. |
Header[] | getResponseHeaders() Returns an array of the response headers that the HTTP method currently has in the order in which they were read. |
int | getStatusCode() Returns the response status code. |
StatusLine | getStatusLine() Provides access to the response status line. |
String | getStatusText() Returns the status text (or "reason phrase") associated with the latest response. |
URI | getURI() Returns the URI of the HTTP method |
boolean | isAborted() Tests whether the execution of this method has been aborted |
boolean | isRequestSent() Returns true if the HTTP has been transmitted to the target server in its entirety, false otherwise. |
void | releaseConnection() Releases the connection being used by this HTTP method. |
void | setDoAuthentication(boolean doAuthentication) Sets whether or not the HTTP method should automatically handle HTTP authentication challenges (status code 401, etc.) |
void | setFollowRedirects(boolean followRedirects) Sets whether or not the HTTP method should automatically follow HTTP redirects (status code 302, etc.) |
void | setHostConfiguration(final HostConfiguration hostconfig) Sets the HostConfiguration host configuration . |
void | setParams(final HttpMethodParams params) Assigns HttpMethodParams HTTP protocol parameters for this method. |
void | setPath(String path) Sets the path of the HTTP method. |
void | setQueryString(String queryString) Sets the query string of this HTTP method. |
void | setQueryString(NameValuePair[] params) Sets the query string of this HTTP method. |
void | setRequestHeader(String headerName, String headerValue) Set the specified request header, overwriting any previous value. |
void | setRequestHeader(Header header) Sets the specified request header, overwriting any previous value. |
void | setURI(URI uri) Sets the URI for this method. |
String | toString() Returns a string representation of the object. |