com.aspose.html.net

Class RequestMessage

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable


    public class RequestMessage
    extends Object
    implements com.aspose.ms.System.IDisposable

    Represents a request message.

    See Also:
    System.IDisposable
    • Constructor Summary

      Constructors 
      Constructor and Description
      RequestMessage(String address)
      Initializes a new instance of the RequestMessage class.
      RequestMessage(Url uri)
      Initializes a new instance of the RequestMessage class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void dispose()
      Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged 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.
    • Constructor Detail

      • RequestMessage

        public RequestMessage(String address)

        Initializes a new instance of the RequestMessage class.

        Parameters:
        address - The request address.
      • RequestMessage

        public RequestMessage(Url uri)

        Initializes a new instance of the RequestMessage class.

        Parameters:
        uri - The request URL.
    • Method Detail

      • getMethod

        public HttpMethod getMethod()

        Gets or sets the HttpMethod.

        Value: The HttpMethod.
      • setMethod

        public void setMethod(HttpMethod value)

        Gets or sets the HttpMethod.

        Value: The HttpMethod.
      • getRequestUri

        public Url getRequestUri()

        Gets or sets the request URI.

        Value: The request URI.
      • setRequestUri

        public void setRequestUri(Url value)

        Gets or sets the request URI.

        Value: The request URI.
      • getHeaders

        public RequestHeaders getHeaders()

        Gets the RequestHeaders.

        Value: The headers.
      • getContent

        public Content getContent()

        Gets or sets the request content.

        Value: The body.
      • setContent

        public void setContent(Content value)

        Gets or sets the request content.

        Value: The body.
      • getTimeout

        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).

      • setTimeout

        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).

      • getCredentials

        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.
      • setCredentials

        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.
      • getCookieContainer

        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.
      • setCookieContainer

        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.
      • getPreAuthenticate

        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.
      • setPreAuthenticate

        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.
      • dispose

        public void dispose()

        Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable