public class HeadMethod extends HttpMethodBase
The HTTP HEAD method is defined in section 9.4 of RFC2616:
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification.
| Constructor and Description |
|---|
HeadMethod()
No-arg constructor.
|
HeadMethod(String uri)
Constructor specifying a URI.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBodyCheckTimeout()
Deprecated.
Use
HttpMethodParams |
String |
getName()
Returns "HEAD".
|
void |
recycle()
Deprecated.
no longer supported and will be removed in the future
version of HttpClient
|
void |
setBodyCheckTimeout(int timeout)
Deprecated.
Use
HttpMethodParams |
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, releaseConnection, removeRequestHeader, removeRequestHeader, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setParams, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setStrictMode, setURI, validatepublic HeadMethod()
public HeadMethod(String uri)
uri - either an absolute or relative URIpublic String getName()
getName in interface HttpMethodgetName in class HttpMethodBasepublic void recycle()
recycle in interface HttpMethodrecycle in class HttpMethodBaseHttpMethodBase.releaseConnection()public int getBodyCheckTimeout()
HttpMethodParamsHttpMethodBase.getParams(),
HttpMethodParams,
HttpMethodParams.HEAD_BODY_CHECK_TIMEOUTpublic void setBodyCheckTimeout(int timeout)
HttpMethodParamstimeout - The period of time in milliseconds to wait for a response
body from a non-compliant server. -1 can be used to
disable non-compliant response body checkHttpMethodBase.getParams(),
HttpMethodParams,
HttpMethodParams.HEAD_BODY_CHECK_TIMEOUTCopyright © 2010 - 2020 Adobe. All Rights Reserved