public abstract class

HttpRequestBase

extends AbstractHttpMessage
implements Cloneable AbortableHttpRequest HttpUriRequest
java.lang.Object
   ↳ org.apache.http.message.AbstractHttpMessage
     ↳ org.apache.http.client.methods.HttpRequestBase
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Basic implementation of an HTTP request that can be modified.

Summary

[Expand]
Inherited Fields
From class org.apache.http.message.AbstractHttpMessage
Public Constructors
HttpRequestBase()
Public Methods
void abort()
Aborts this http request.
Object clone()
abstract String getMethod()
Returns the HTTP method this request uses, such as GET, PUT, POST, or other.
ProtocolVersion getProtocolVersion()
RequestLine getRequestLine()
URI getURI()
Returns the original request URI.
boolean isAborted()
Tests if the request execution has been aborted.
void setConnectionRequest(ClientConnectionRequest connRequest)
Sets the ClientConnectionRequest callback that can be used to abort a long-lived request for a connection.
void setReleaseTrigger(ConnectionReleaseTrigger releaseTrigger)
Sets the ConnectionReleaseTrigger callback that can be used to abort an active connection.
void setURI(URI uri)
[Expand]
Inherited Methods
From class org.apache.http.message.AbstractHttpMessage
From class java.lang.Object
From interface org.apache.http.HttpMessage
From interface org.apache.http.HttpRequest
From interface org.apache.http.client.methods.AbortableHttpRequest
From interface org.apache.http.client.methods.HttpUriRequest

Public Constructors

public HttpRequestBase ()

Also: HttpClient

Public Methods

public void abort ()

Also: HttpClient

Aborts this http request. Any active execution of this method should return immediately. If the request has not started, it will abort after the next execution. Aborting this request will cause all subsequent executions with this request to fail.

public Object clone ()

Also: HttpClient

public abstract String getMethod ()

Also: HttpClient

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

public ProtocolVersion getProtocolVersion ()

Also: HttpClient

public RequestLine getRequestLine ()

Also: HttpClient

public URI getURI ()

Also: HttpClient

Returns the original request URI.

Please note URI remains unchanged in the course of request execution and is not updated if the request is redirected to another location.

public boolean isAborted ()

Also: HttpClient

Tests if the request execution has been aborted.

Returns
  • true if the request execution has been aborted, false otherwise.

public void setConnectionRequest (ClientConnectionRequest connRequest)

Also: HttpClient

Sets the ClientConnectionRequest callback that can be used to abort a long-lived request for a connection. If the request is already aborted, throws an IOException.

Throws
IOException

public void setReleaseTrigger (ConnectionReleaseTrigger releaseTrigger)

Also: HttpClient

Sets the ConnectionReleaseTrigger callback that can be used to abort an active connection. Typically, this will be the ManagedClientConnection itself. If the request is already aborted, throws an IOException.

Throws
IOException

public void setURI (URI uri)

Also: HttpClient