public class HttpRequest extends Request
Constructor and Description |
---|
HttpRequest(Context context,
ServerCall httpCall)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
abort()
Ask the connector to attempt to abort the related network connection, for
example immediately closing the socket.
|
static void |
addHeader(Request request,
String headerName,
String headerValue)
Adds a new header to the given request.
|
List<CacheDirective> |
getCacheDirectives()
Returns the cache directives.
Note that when used with HTTP connectors, this property maps to the "Cache-Control" header. |
ChallengeResponse |
getChallengeResponse()
Returns the authentication response sent by a client to an origin server.
|
ClientInfo |
getClientInfo()
Returns the client-specific information.
|
Conditions |
getConditions()
Returns the condition data applying to this call.
|
Series<Cookie> |
getCookies()
Returns the cookies provided by the client.
|
Representation |
getEntity()
Returns the representation provided by the client.
|
Series<Header> |
getHeaders()
Returns the HTTP headers.
|
ServerCall |
getHttpCall()
Returns the low-level HTTP call.
|
ChallengeResponse |
getProxyChallengeResponse()
Returns the authentication response sent by a client to a proxy.
|
List<Range> |
getRanges()
Returns the ranges to return from the target resource's representation.
|
List<RecipientInfo> |
getRecipientsInfo()
Returns the intermediary recipient information.
Note that when used with HTTP connectors, this property maps to the "Via" headers. |
Reference |
getReferrerRef()
Returns the referrer reference if available.
|
List<Warning> |
getWarnings()
Returns the additional warnings information.
Note that when used with HTTP connectors, this property maps to the "Warning" headers. |
void |
setChallengeResponse(ChallengeResponse response)
Sets the authentication response sent by a client to an origin server.
|
void |
setEntity(Representation entity)
Sets the entity representation.
|
void |
setProxyChallengeResponse(ChallengeResponse response)
Sets the authentication response sent by a client to a proxy.
|
void |
setRecipientsInfo(List<RecipientInfo> recipientsInfo)
Sets the modifiable list of intermediary recipients.
|
void |
setWarnings(List<Warning> warnings)
Sets the additional warnings information.
|
commit, getCurrent, getHostRef, getMaxForwards, getMethod, getOnResponse, getOriginalRef, getProtocol, getResourceRef, getRootRef, isAsynchronous, isConfidential, isEntityAvailable, isExpectingResponse, isLoggable, isSynchronous, setClientInfo, setConditions, setCookies, setHostRef, setHostRef, setLoggable, setMaxForwards, setMethod, setOnResponse, setOriginalRef, setProtocol, setRanges, setReferrerRef, setReferrerRef, setResourceRef, setResourceRef, setRootRef, toString
getAttributes, getDate, getEntityAsText, getOnError, getOnSent, release, setAttributes, setCacheDirectives, setDate, setEntity, setOnError, setOnSent
public HttpRequest(Context context, ServerCall httpCall)
context
- The context of the HTTP server connector that issued the call.httpCall
- The low-level HTTP server call.public static void addHeader(Request request, String headerName, String headerValue)
request
- The request to update.headerName
- The header name to add.headerValue
- The header value to add.public boolean abort()
Request
public List<CacheDirective> getCacheDirectives()
Message
getCacheDirectives
in class Message
public ChallengeResponse getChallengeResponse()
Request
getChallengeResponse
in class Request
public ClientInfo getClientInfo()
getClientInfo
in class Request
public Conditions getConditions()
getConditions
in class Request
public Series<Cookie> getCookies()
getCookies
in class Request
public Representation getEntity()
public ServerCall getHttpCall()
public ChallengeResponse getProxyChallengeResponse()
Request
getProxyChallengeResponse
in class Request
public List<Range> getRanges()
Request
public List<RecipientInfo> getRecipientsInfo()
Message
getRecipientsInfo
in class Message
public Reference getReferrerRef()
getReferrerRef
in class Request
public List<Warning> getWarnings()
Message
getWarnings
in class Message
public void setChallengeResponse(ChallengeResponse response)
Request
setChallengeResponse
in class Request
response
- The authentication response sent by a client to an origin
server.public void setEntity(Representation entity)
Message
public void setProxyChallengeResponse(ChallengeResponse response)
Request
setProxyChallengeResponse
in class Request
response
- The authentication response sent by a client to a proxy.public void setRecipientsInfo(List<RecipientInfo> recipientsInfo)
Message
setRecipientsInfo
in class Message
recipientsInfo
- A list of intermediary recipients.public void setWarnings(List<Warning> warnings)
Message
setWarnings
in class Message
warnings
- The warnings.Copyright © 2005–2015. All rights reserved.