Example usage for Java org.apache.commons.httpclient.methods HeadMethod fields, constructors, methods, implement or subclass
The text is from its open source code.
void | addRequestHeader(String headerName, String headerValue) Adds the specified request header, NOT overwriting any previous value. |
void | addRequestHeader(Header header) Adds the specified request header, NOT overwriting any previous value. |
AuthState | getHostAuthState() Returns the target host AuthState authentication state |
String | getName() |
HttpMethodParams | getParams() Returns HttpMethodParams HTTP protocol parameters associated with this method. |
String | getPath() Gets the path of this HTTP method. |
Header | getRequestHeader(String headerName) Returns the specified request header. |
byte[] | getResponseBody() 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 | 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(String headerName) |
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 |
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 | setPath(String path) Sets the path of the HTTP method. |
void | setQueryString(String queryString) Sets the query string of this HTTP method. |
void | setRequestHeader(String headerName, String headerValue) Set the specified request header, overwriting any previous value. |
void | setURI(URI uri) Sets the URI for this method. |