public class RequestMessage
extends java.lang.Object
implements com.aspose.ms.System.IDisposable
Represents a request message.
IDisposable
Constructor and Description |
---|
RequestMessage(java.lang.String address)
Initializes a new instance of the
RequestMessage class. |
RequestMessage(Url uri)
Initializes a new instance of the
RequestMessage class. |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
protected void |
dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources.
|
Content |
getContent()
Gets or sets the request content.
|
com.aspose.ms.System.Net.CookieContainer |
getCookieContainer()
Gets or sets the cookie container used to store server cookies by the handler.
|
com.aspose.ms.System.Net.ICredentials |
getCredentials()
Gets or sets authentication information for the request.
|
RequestHeaders |
getHeaders()
Gets the
RequestHeaders . |
HttpMethod |
getMethod()
Gets or sets the
HttpMethod . |
boolean |
getPreAuthenticate()
Gets or sets a value that indicates whether to send an Authorization header with the request.
|
Url |
getRequestUri()
Gets or sets the request URI.
|
com.aspose.ms.System.TimeSpan |
getTimeout()
The number of milliseconds to wait before the request times out.
|
void |
setContent(Content value)
Gets or sets the request content.
|
void |
setCookieContainer(com.aspose.ms.System.Net.CookieContainer value)
Gets or sets the cookie container used to store server cookies by the handler.
|
void |
setCredentials(com.aspose.ms.System.Net.ICredentials value)
Gets or sets authentication information for the request.
|
void |
setMethod(HttpMethod value)
Gets or sets the
HttpMethod . |
void |
setPreAuthenticate(boolean value)
Gets or sets a value that indicates whether to send an Authorization header with the request.
|
void |
setRequestUri(Url value)
Gets or sets the request URI.
|
void |
setTimeout(com.aspose.ms.System.TimeSpan value)
The number of milliseconds to wait before the request times out.
|
public RequestMessage(java.lang.String address)
Initializes a new instance of the RequestMessage
class.
address
- The request address.public RequestMessage(Url uri)
Initializes a new instance of the RequestMessage
class.
uri
- The request URL.public HttpMethod getMethod()
Gets or sets the HttpMethod
.
HttpMethod
.public void setMethod(HttpMethod value)
Gets or sets the HttpMethod
.
HttpMethod
.public Url getRequestUri()
Gets or sets the request URI.
Value: The request URI.public void setRequestUri(Url value)
Gets or sets the request URI.
Value: The request URI.public RequestHeaders getHeaders()
Gets the RequestHeaders
.
public Content getContent()
Gets or sets the request content.
Value: The body.public void setContent(Content value)
Gets or sets the request content.
Value: The body.public com.aspose.ms.System.TimeSpan getTimeout()
The number of milliseconds to wait before the request times out. The default value is 100,000 milliseconds (100 seconds).
public void setTimeout(com.aspose.ms.System.TimeSpan value)
The number of milliseconds to wait before the request times out. The default value is 100,000 milliseconds (100 seconds).
public com.aspose.ms.System.Net.ICredentials getCredentials()
Gets or sets authentication information for the request.
Value: An System.Net.ICredentials that contains the authentication credentials associated with the request. The default is null.public void setCredentials(com.aspose.ms.System.Net.ICredentials value)
Gets or sets authentication information for the request.
Value: An System.Net.ICredentials that contains the authentication credentials associated with the request. The default is null.public com.aspose.ms.System.Net.CookieContainer getCookieContainer()
Gets or sets the cookie container used to store server cookies by the handler.
Value: A System.Net.CookieContainer that contains the cookies associated with this request.public void setCookieContainer(com.aspose.ms.System.Net.CookieContainer value)
Gets or sets the cookie container used to store server cookies by the handler.
Value: A System.Net.CookieContainer that contains the cookies associated with this request.public boolean getPreAuthenticate()
Gets or sets a value that indicates whether to send an Authorization header with the request.
Value:true
to send an HTTP Authorization header with requests after authentication has taken place; otherwise, false
. The default is false
.public void setPreAuthenticate(boolean value)
Gets or sets a value that indicates whether to send an Authorization header with the request.
Value:true
to send an HTTP Authorization header with requests after authentication has taken place; otherwise, false
. The default is false
.protected void dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources.
disposing
- true
to release both managed and unmanaged resources; false
to release only unmanaged resources.public void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose
in interface com.aspose.ms.System.IDisposable