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 |
postData(java.lang.String postData)
Sets a string that represents the POST data that will be sent to the resource.
|
public LoadUrlParams.Builder postData(java.lang.String postData)
When Content-Type in the extra headers is set to "application/x-www-form-urlencoded",
the POST data must be in the key=value&key=value format. When Content-Type is set to "text/plain", the POST data string can be in any plain format.
postData - the POST datapublic LoadUrlParams.Builder addExtraHeader(HttpHeader httpHeader)
If you send POST data, then you must add the Content-Type HTTP header. For
example, "Content-Type: application/x-www-form-urlencoded" or "Content-Type:
text/plain".
httpHeader - the extra HTTP headerpublic LoadUrlParams build()
LoadUrlParams instance built from the current state of this
builder.LoadUrlParams instance