Package com.naver.ads.network.raw
Class HttpRequestProperties.Builder
-
- All Implemented Interfaces:
public final class HttpRequestProperties.BuilderBuilder for HttpRequestProperties instances.
-
-
Constructor Summary
Constructors Constructor Description HttpRequestProperties.Builder()
-
Method Summary
Modifier and Type Method Description final HttpRequestProperties.Builderuri(Uri uri)Sets the uri of the HTTP request. final HttpRequestProperties.Buildermethod(HttpMethod method)Sets the HTTP request method. final HttpRequestProperties.Builderheaders(HttpHeaders headers)Sets the HttpHeaders. final HttpRequestProperties.Builderheaders(Pair<String, String> headers)Sets the pairs of header consisting of a name and a value final HttpRequestProperties.Builderbody(ByteArray body)Sets HTTP request body to a ByteArray. final HttpRequestProperties.Builderbody(String body)Sets HTTP request body to a String. final HttpRequestProperties.Builderbody(JSONObject body)Sets HTTP request body to a JSONObject. final HttpRequestProperties.BuilderconnectTimeoutMillis(Integer connectTimeoutMillis)Sets the HTTP request's connection timeout millis. final HttpRequestProperties.BuilderreadTimeoutMillis(Integer readTimeoutMillis)the HTTP request's read timeout millis. final HttpRequestProperties.BuilderallowCrossProtocolRedirects(Boolean allowCrossProtocolRedirects)Sets whether cross-protocol redirects (i.e. final HttpRequestProperties.BuilderuseStream(Boolean useStream)Sets whether to use an InputStream or not. final HttpRequestProperties.BuildercollectFailureLog(Boolean collectFailureLog)Sets whether to collect http failure or not. final HttpRequestPropertiesbuild()Returns a new HttpRequestProperties -
-
Method Detail
-
uri
final HttpRequestProperties.Builder uri(Uri uri)
Sets the uri of the HTTP request.
-
method
final HttpRequestProperties.Builder method(HttpMethod method)
Sets the HTTP request method.
-
headers
final HttpRequestProperties.Builder headers(HttpHeaders headers)
Sets the HttpHeaders.
-
headers
final HttpRequestProperties.Builder headers(Pair<String, String> headers)
Sets the pairs of header consisting of a name and a value
-
body
final HttpRequestProperties.Builder body(ByteArray body)
Sets HTTP request body to a ByteArray.
-
body
final HttpRequestProperties.Builder body(String body)
Sets HTTP request body to a String.
-
body
final HttpRequestProperties.Builder body(JSONObject body)
Sets HTTP request body to a JSONObject.
-
connectTimeoutMillis
final HttpRequestProperties.Builder connectTimeoutMillis(Integer connectTimeoutMillis)
Sets the HTTP request's connection timeout millis.
-
readTimeoutMillis
final HttpRequestProperties.Builder readTimeoutMillis(Integer readTimeoutMillis)
the HTTP request's read timeout millis.
-
allowCrossProtocolRedirects
final HttpRequestProperties.Builder allowCrossProtocolRedirects(Boolean allowCrossProtocolRedirects)
Sets whether cross-protocol redirects (i.e. redirects from HTTP to HTTPS and vice versa) are enabled when fetching remote data.
-
useStream
final HttpRequestProperties.Builder useStream(Boolean useStream)
Sets whether to use an InputStream or not.
If
true, use AsyncHttpResponse; iffalse, use BufferedHttpResponse.
-
collectFailureLog
final HttpRequestProperties.Builder collectFailureLog(Boolean collectFailureLog)
Sets whether to collect http failure or not. (collect to SDK NELO project)
-
build
final HttpRequestProperties build()
Returns a new HttpRequestProperties
-
-
-
-