java.lang.Object | |
↳ | com.tencent.smtt.export.external.interfaces.UrlRequest.Builder |
Known Direct Subclasses |
Builder for UrlRequest
s. Allows configuring requests before constructing them
with build()
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | REQUEST_PRIORITY_HIGHEST | Highest request priority. | |||||||||
int | REQUEST_PRIORITY_IDLE | Lowest request priority. | |||||||||
int | REQUEST_PRIORITY_LOW | Low request priority. | |||||||||
int | REQUEST_PRIORITY_LOWEST | Very low request priority. | |||||||||
int | REQUEST_PRIORITY_MEDIUM | Medium request priority. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builder() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract UrlRequest.Builder |
addHeader(String header, String value)
Adds a request header.
| ||||||||||
abstract UrlRequest |
build()
Creates a
UrlRequest using configuration within this
UrlRequest.Builder . | ||||||||||
abstract UrlRequest.Builder |
disableCache()
Disables cache for the request.
| ||||||||||
abstract UrlRequest.Builder |
setDns(String host, String address)
set dns
| ||||||||||
abstract UrlRequest.Builder |
setHttpMethod(String method)
Sets the HTTP method verb to use for this request.
| ||||||||||
abstract UrlRequest.Builder |
setPriority(int priority)
Sets priority of the request which should be one of the
REQUEST_PRIORITY_* values. | ||||||||||
abstract UrlRequest.Builder |
setRequestBody(String body)
set requeset body
| ||||||||||
abstract UrlRequest.Builder |
setRequestBodyBytes(byte[] body)
set requeset body
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Highest request priority. Passed to setPriority(int)
.
Lowest request priority. Passed to setPriority(int)
.
Low request priority. Passed to setPriority(int)
.
Very low request priority. Passed to setPriority(int)
.
Medium request priority. Passed to setPriority(int)
. This is the
default priority given to the request.
Adds a request header.
header | header name. |
---|---|
value | header value. |
Creates a UrlRequest
using configuration within this
UrlRequest.Builder
. The returned UrlRequest
can then be started
by calling start()
.
UrlRequest
using configuration within
this UrlRequest.Builder
.
Disables cache for the request. If context is not set up to use cache, this call has no effect.
set dns
host | host |
---|---|
address | address |
Sets the HTTP method verb to use for this request.
The default when this method is not called is "GET" if the request has no body or "POST" if it does.
method | "GET", "HEAD", "DELETE", "POST" or "PUT". |
---|
Sets priority of the request which should be one of the
REQUEST_PRIORITY_*
values.
The request is given REQUEST_PRIORITY_MEDIUM
priority if
this method is not called.
priority | priority of the request which should be one of the
REQUEST_PRIORITY_* values. |
---|
set requeset body
body | string |
---|
set requeset body
body | byte[] |
---|