public final class LoadURLParams
extends java.lang.Object
Browser.loadURL(LoadURLParams)
method.Constructor and Description |
---|
LoadURLParams(java.lang.String url)
Constructs a new
LoadURLParams instance with specific url ,
postData and extra headers set to empty string. |
LoadURLParams(java.lang.String url,
java.lang.String postData)
Constructs a new
LoadURLParams instance with specific url , postData
and extra headers set to "Content-Type: application/x-www-form-urlencoded\n". |
LoadURLParams(java.lang.String url,
java.lang.String postData,
java.lang.String extraHeaders)
Constructs a new
LoadURLParams instance with specific url ,
postData and extraHeaders . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExtraHeaders()
Returns a string that represents extra headers separated by "\n".
|
java.lang.String |
getPostData()
Returns a string that represents POST data that will be sent to a resource
which address is specified by the
getURL() value. |
java.lang.String |
getURL()
Returns a string that represents URL of a resource that will be loaded.
|
public LoadURLParams(java.lang.String url)
LoadURLParams
instance with specific url
,
postData and extra headers set to empty string.url
- represents URL of a resource that will be loaded. Cannot be null
or empty
string.java.lang.IllegalArgumentException
- when url
is null
or empty string.public LoadURLParams(java.lang.String url, java.lang.String postData)
LoadURLParams
instance with specific url
, postData
and extra headers set to "Content-Type: application/x-www-form-urlencoded\n". Since this
method sets extra headers to the "application/x-www-form-urlencoded" Content Type, the postData
string must be in the key=value&key=value
format.url
- represents URL of a resource that will be loaded. Cannot be null
or empty
string.postData
- a string that represents POST data in the key=value&key=value
format.
Cannot be null
.java.lang.IllegalArgumentException
- when url
is null
or empty string.java.lang.IllegalArgumentException
- when postData
is null
.public LoadURLParams(java.lang.String url, java.lang.String postData, java.lang.String extraHeaders)
LoadURLParams
instance with specific url
,
postData
and extraHeaders
.url
- represents URL of a resource that will be loaded. Cannot be null
or empty
string.postData
- a string that represents POST data. When Content-Type in 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. Cannot be null
.extraHeaders
- a string that contains "\n"-separated extra headers. It must contain
Content-Type header if you send POST data. For example, "Content-Type:
application/x-www-form-urlencoded\n" or "Content-Type: text/plain\n". Cannot be null
.java.lang.IllegalArgumentException
- when url
is null
or empty string.java.lang.IllegalArgumentException
- when extraHeaders
or postData
is null
.public java.lang.String getURL()
public java.lang.String getPostData()
getURL()
value.public java.lang.String getExtraHeaders()