com.aspose.html.forms

Class FormSubmitter

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


    public class FormSubmitter
    extends Object
    implements com.aspose.html.internal.ms.System.IDisposable

    This class allows to prepare specified HTMLFormElement, collects values from the form element, submit them to the remote server and receives a response.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  FormSubmitter.Value 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void dispose()
      Releases unmanaged and - optionally - managed resources.
      String getAction()
      Server-side form handler.
      HttpMethod getMethod() 
      void setAction(String value)
      Server-side form handler.
      void setMethod(HttpMethod value) 
      SubmissionResult submit()
      Submits the form data to the server.
      SubmissionResult submit(com.aspose.html.internal.ms.System.Net.CookieContainer cookieContainer)
      Submits the form data to the server with specified cookies.
      SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials)
      Submits the form data to the server with specified user credentials.
      SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials, com.aspose.html.internal.ms.System.Net.CookieContainer cookieContainer)
      Submits the form data to the server with specified user credentials and cookies.
      SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials, com.aspose.html.internal.ms.System.TimeSpan timeout)
      Submits the form data to the server with specified user credentials and timeout.
      SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials, com.aspose.html.internal.ms.System.TimeSpan timeout, boolean preAuthenticate)
      Submits the form data to the server with specified user credentials.
      SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials, com.aspose.html.internal.ms.System.TimeSpan timeout, boolean preAuthenticate, com.aspose.html.internal.ms.System.Net.CookieContainer cookieContainer)
      Submits the form data to the server with specified user credentials and cookies.
      SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials, com.aspose.html.internal.ms.System.TimeSpan timeout, com.aspose.html.internal.ms.System.Net.CookieContainer cookieContainer)
      Submits the form data to the server with specified user credentials, timeout and cookies.
      SubmissionResult submit(com.aspose.html.internal.ms.System.TimeSpan timeout)
      Submits the form data to the server with specified timeout.
      SubmissionResult submit(com.aspose.html.internal.ms.System.TimeSpan timeout, com.aspose.html.internal.ms.System.Net.CookieContainer cookieContainer)
      Submits the form data to the server with specified timeout and cookies.
    • Method Detail

      • setMethod

        public void setMethod(HttpMethod value)
      • getAction

        public String getAction()

        Server-side form handler. See the action attribute definition in HTML 4.01.

      • setAction

        public void setAction(String value)

        Server-side form handler. See the action attribute definition in HTML 4.01.

      • submit

        public SubmissionResult submit()

        Submits the form data to the server.

        Returns:
        The result of the submission.
      • submit

        public SubmissionResult submit(com.aspose.html.internal.ms.System.Net.CookieContainer cookieContainer)

        Submits the form data to the server with specified cookies.

        Parameters:
        cookieContainer - The cookie container.
        Returns:
        The result of the submission.
      • submit

        public SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials)

        Submits the form data to the server with specified user credentials.

        Parameters:
        credentials - The authentication information for the request.
        Returns:
        The result of the submission.
      • submit

        public SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials,
                                       com.aspose.html.internal.ms.System.Net.CookieContainer cookieContainer)

        Submits the form data to the server with specified user credentials and cookies.

        Parameters:
        credentials - The authentication information for the request.
        cookieContainer - The cookie container.
        Returns:
        The result of the submission.
      • submit

        public SubmissionResult submit(com.aspose.html.internal.ms.System.TimeSpan timeout)

        Submits the form data to the server with specified timeout.

        Parameters:
        timeout - The number of milliseconds to wait before the request times out.
        Returns:
        The result of the submission.
      • submit

        public SubmissionResult submit(com.aspose.html.internal.ms.System.TimeSpan timeout,
                                       com.aspose.html.internal.ms.System.Net.CookieContainer cookieContainer)

        Submits the form data to the server with specified timeout and cookies.

        Parameters:
        timeout - The number of milliseconds to wait before the request times out.
        cookieContainer - The cookie container.
        Returns:
        The result of the submission.
      • submit

        public SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials,
                                       com.aspose.html.internal.ms.System.TimeSpan timeout)

        Submits the form data to the server with specified user credentials and timeout.

        Parameters:
        credentials - The authentication information for the request.
        timeout - The number of milliseconds to wait before the request times out.
        Returns:
        The result of the submission.
      • submit

        public SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials,
                                       com.aspose.html.internal.ms.System.TimeSpan timeout,
                                       com.aspose.html.internal.ms.System.Net.CookieContainer cookieContainer)

        Submits the form data to the server with specified user credentials, timeout and cookies.

        Parameters:
        credentials - The authentication information for the request.
        timeout - The number of milliseconds to wait before the request times out.
        cookieContainer - The cookie container.
        Returns:
        The result of the submission.
      • submit

        public SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials,
                                       com.aspose.html.internal.ms.System.TimeSpan timeout,
                                       boolean preAuthenticate)

        Submits the form data to the server with specified user credentials.

        Parameters:
        credentials - The authentication information for the request.
        timeout - The number of milliseconds to wait before the request times out.
        preAuthenticate - The value that indicates whether to send an Authorization header with the request.
        Returns:
        The result of the submission.
      • submit

        public SubmissionResult submit(com.aspose.html.internal.ms.System.Net.ICredentials credentials,
                                       com.aspose.html.internal.ms.System.TimeSpan timeout,
                                       boolean preAuthenticate,
                                       com.aspose.html.internal.ms.System.Net.CookieContainer cookieContainer)

        Submits the form data to the server with specified user credentials and cookies.

        Parameters:
        credentials - The authentication information for the request.
        timeout - The number of milliseconds to wait before the request times out.
        preAuthenticate - The value that indicates whether to send an Authorization header with the request.
        cookieContainer - The cookie container.
        Returns:
        The result of the submission.
      • dispose

        public void dispose()

        Releases unmanaged and - optionally - managed resources.

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