Class LoadUrlParams.Builder

java.lang.Object
com.teamdev.jxbrowser.navigation.LoadUrlParams.Builder
Enclosing interface:
LoadUrlParams

public static final class LoadUrlParams.Builder extends Object
A builder of LoadUrlParams.

Builders are created by invoking LoadUrlParams.newBuilder(String). Each of the setter methods modifies the state of the builder and returns the same instance. Builders are not thread-safe and should not be used concurrently from multiple threads without external synchronization.

  • Method Details

    • uploadData

      public LoadUrlParams.Builder uploadData(ByteData data)
      Sets the upload data as a sequence of bytes that will be sent to the resource.

      Sends POST data as bytes with application/octet-stream content type. Use addExtraHeader(HttpHeader) to override the content type.

      Parameters:
      data - the upload data as a sequence of bytes
      Returns:
      this builder
      Since:
      7.29
    • uploadData

      public LoadUrlParams.Builder uploadData(TextData data)
      Sets the upload data in the text/plain format that will be sent to the resource.

      The content type configured with addExtraHeader(com.teamdev.jxbrowser.net.HttpHeader) is ignored.

      Parameters:
      data - the upload data in the text/plain format
      Returns:
      this builder
      Since:
      7.29
    • uploadData

      public LoadUrlParams.Builder uploadData(FormData data)
      Sets the upload data in the application/x-www-form-urlencoded format that will be sent to the resource.

      The content type configured with addExtraHeader(com.teamdev.jxbrowser.net.HttpHeader) is ignored.

      Parameters:
      data - the upload data in the application/x-www-form-urlencoded format
      Returns:
      this builder
      Since:
      7.29
    • uploadData

      public LoadUrlParams.Builder uploadData(MultipartFormData data)
      Sets the upload data in the multipart/form-data format that will be sent to the resource.

      The content type configured with addExtraHeader(com.teamdev.jxbrowser.net.HttpHeader) is ignored.

      Parameters:
      data - the upload data in the multipart/form-data format
      Returns:
      this builder
      Since:
      7.29
    • addExtraHeader

      public LoadUrlParams.Builder addExtraHeader(HttpHeader httpHeader)
      Adds an extra HTTP header to the HTTP headers that will be sent to the resource.
      Parameters:
      httpHeader - the extra HTTP header
      Returns:
      this builder
    • build

      public LoadUrlParams build()
      Returns a new LoadUrlParams instance built from the current state of this builder.
      Returns:
      a new LoadUrlParams instance