public static final class LoadUrlParams.Builder
extends java.lang.Object
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.
| Modifier and Type | Method and Description |
|---|---|
LoadUrlParams.Builder |
addExtraHeader(HttpHeader httpHeader)
Adds an extra HTTP header to the HTTP headers that will be sent to the resource.
|
LoadUrlParams |
build()
Returns a new
LoadUrlParams instance built from the current state of this
builder. |
LoadUrlParams.Builder |
uploadData(ByteData data)
Sets the upload data as a sequence of bytes that will be sent to the resource.
|
LoadUrlParams.Builder |
uploadData(FormData data)
Sets the upload data in the
application/x-www-form-urlencoded format that will be
sent to the resource. |
LoadUrlParams.Builder |
uploadData(MultipartFormData data)
Sets the upload data in the
multipart/form-data format that will be sent to the
resource. |
LoadUrlParams.Builder |
uploadData(TextData data)
Sets the upload data in the
text/plain format that will be sent to the resource. |
public LoadUrlParams.Builder uploadData(ByteData data)
Sends POST data as bytes with application/octet-stream content type.
Use addExtraHeader(HttpHeader) to override the content type.
data - the upload data as a sequence of bytespublic LoadUrlParams.Builder uploadData(TextData data)
text/plain format that will be sent to the resource.
The content type configured with addExtraHeader(com.teamdev.jxbrowser.net.HttpHeader) is ignored.
data - the upload data in the text/plain formatpublic LoadUrlParams.Builder uploadData(FormData data)
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.
data - the upload data in the application/x-www-form-urlencoded formatpublic LoadUrlParams.Builder uploadData(MultipartFormData data)
multipart/form-data format that will be sent to the
resource.
The content type configured with addExtraHeader(com.teamdev.jxbrowser.net.HttpHeader) is ignored.
data - the upload data in the multipart/form-data formatpublic LoadUrlParams.Builder addExtraHeader(HttpHeader httpHeader)
httpHeader - the extra HTTP headerpublic LoadUrlParams build()
LoadUrlParams instance built from the current state of this
builder.LoadUrlParams instance