Package com.teamdev.jxbrowser.navigation
Class LoadUrlParams.Builder
java.lang.Object
com.teamdev.jxbrowser.navigation.LoadUrlParams.Builder
- Enclosing interface:
- LoadUrlParams
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 Summary
Modifier and TypeMethodDescriptionaddExtraHeader(HttpHeader httpHeader) Adds an extra HTTP header to the HTTP headers that will be sent to the resource.build()Returns a newLoadUrlParamsinstance built from the current state of this builder.uploadData(ByteData data) Sets the upload data as a sequence of bytes that will be sent to the resource.uploadData(FormData data) Sets the upload data in theapplication/x-www-form-urlencodedformat that will be sent to the resource.uploadData(MultipartFormData data) Sets the upload data in themultipart/form-dataformat that will be sent to the resource.uploadData(TextData data) Sets the upload data in thetext/plainformat that will be sent to the resource.
-
Method Details
-
uploadData
Sets the upload data as a sequence of bytes that will be sent to the resource.Sends POST data as bytes with
application/octet-streamcontent type. UseaddExtraHeader(HttpHeader)to override the content type.- Parameters:
data- the upload data as a sequence of bytes- Returns:
- this builder
- Since:
- 7.29
-
uploadData
Sets the upload data in thetext/plainformat 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 thetext/plainformat- Returns:
- this builder
- Since:
- 7.29
-
uploadData
Sets the upload data in theapplication/x-www-form-urlencodedformat 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 theapplication/x-www-form-urlencodedformat- Returns:
- this builder
- Since:
- 7.29
-
uploadData
Sets the upload data in themultipart/form-dataformat 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 themultipart/form-dataformat- Returns:
- this builder
- Since:
- 7.29
-
addExtraHeader
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
Returns a newLoadUrlParamsinstance built from the current state of this builder.- Returns:
- a new
LoadUrlParamsinstance
-