Top Description Fields Constructors Methods
org.apache.http.client.methods

public Class HttpHead

extends HttpRequestBase
Class Inheritance
Imports
java.net.URI

Deprecated

as a consequence of HttpRequestBase being deprecated. See corresponding docs for further information.

HTTP HEAD method.

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.
Since
4.0

Field Summary

Modifier and TypeField and Description
public static final String

Constructor Summary

AccessConstructor and Description
public
public
HttpHead(final URI uri)

public
HttpHead(final String uri)

Method Summary

Modifier and TypeMethod and Description
public String
getMethod()

Implements abstract org.apache.http.client.methods.HttpRequestBase.getMethod.

Implements org.apache.http.client.methods.HttpUriRequest.getMethod.

Returns the HTTP method this request uses, such as GET, PUT, POST, or other.
Inherited from org.apache.http.client.methods.HttpRequestBase:
getConfiggetProtocolVersiongetRequestLinegetURIreleaseConnectionsetConfigsetProtocolVersionsetURIstartedtoString

Field Detail

METHOD_NAMEback to summary
public static final String METHOD_NAME

Constructor Detail

HttpHeadback to summary
public HttpHead()
HttpHeadback to summary
public HttpHead(final URI uri)
HttpHeadback to summary
public HttpHead(final String uri)
Exceptions
IllegalArgumentException:
if the uri is invalid.

Method Detail

getMethodback to summary
public String getMethod()

Implements abstract org.apache.http.client.methods.HttpRequestBase.getMethod.

Implements org.apache.http.client.methods.HttpUriRequest.getMethod.

Doc from org.apache.http.client.methods.HttpUriRequest.getMethod.

Returns the HTTP method this request uses, such as GET, PUT, POST, or other.

Annotations
@Override