java.lang.Object | ||
↳ | com.tencent.smtt.export.external.interfaces.UrlRequest.Builder | |
↳ | com.tencent.smtt.sdk.UrlRequestBuilderImpl |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.tencent.smtt.export.external.interfaces.UrlRequest.Builder
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
UrlRequestBuilderImpl(String url, UrlRequest.Callback callback, Executor executor)
Creates a builder for
UrlRequest objects. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
UrlRequestBuilderImpl |
addHeader(String header, String value)
Adds a request header.
| ||||||||||
UrlRequest |
build()
create UrlRequest
| ||||||||||
UrlRequestBuilderImpl |
disableCache()
Disables cache for the request.
| ||||||||||
UrlRequestBuilderImpl |
setDns(String host, String address)
set dns
| ||||||||||
UrlRequest.Builder |
setHttpMethod(String method)
Sets the HTTP method verb to use for this request.
| ||||||||||
UrlRequestBuilderImpl |
setPriority(int priority)
Sets priority of the request which should be one of the
REQUEST_PRIORITY_* values. | ||||||||||
UrlRequest.Builder |
setRequestBody(String body)
set requeset body
| ||||||||||
UrlRequest.Builder |
setRequestBodyBytes(byte[] body)
set requeset body
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.tencent.smtt.export.external.interfaces.UrlRequest.Builder
| |||||||||||
From class
java.lang.Object
|
Creates a builder for UrlRequest
objects. All callbacks for
generated UrlRequest
objects will be invoked on
executor
's thread. executor
must not run tasks on the
current thread to prevent blocking networking operations and causing
exceptions during shutdown.
url | URL for the generated requests. |
---|---|
callback | callback object that gets invoked on different events. |
executor | Executor on which all callbacks will be invoked. |
Adds a request header.
header | header name. |
---|---|
value | header value. |
create UrlRequest
NullPointerException | if UrlRequest build fail |
---|
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 | byte[] |
---|