-
public class Request
-
-
Field Summary
Fields Modifier and Type Field Description public final static intTIMEOUT_NOT_SETprivate final Stringurlprivate final Array<byte>bodyprivate final Stringmethodprivate final Map<String, String>headersprivate final booleanisEncryptedprivate booleanreadResponseBodyprivate booleandisableCacheprivate booleanfollowRedirectsprivate inttimeoutMillis
-
Method Summary
Modifier and Type Method Description StringgetUrl()Array<byte>getBody()StringgetMethod()Map<String, String>getHeaders()booleanisEncrypted()RequestsetReadResponseBody(boolean shouldReadResponseBody)RequestsetDisableCache(boolean disableCache)RequestsetFollowRedirects(boolean followRedirects)intgetTimeoutMillis()RequestsetTimeoutMillis(int timeoutMillis)booleanisReadResponseBody()Indicate whenever HTTP client should read the response body for this http requestSome request are not interested in response body, but just in response code.Skip reading body will save HTTP traffic, because HttpClient will download only status code and headers. booleanisDisableCache()Indicate if HttpUrlConnection should avoid use caches, effectively set Cache-Control headersee RD-48694 booleanisFollowRedirects()-
-
Method Detail
-
getHeaders
@NonNull() Map<String, String> getHeaders()
-
isEncrypted
boolean isEncrypted()
-
setReadResponseBody
Request setReadResponseBody(boolean shouldReadResponseBody)
-
setDisableCache
Request setDisableCache(boolean disableCache)
-
setFollowRedirects
Request setFollowRedirects(boolean followRedirects)
-
getTimeoutMillis
int getTimeoutMillis()
-
setTimeoutMillis
Request setTimeoutMillis(int timeoutMillis)
-
isReadResponseBody
boolean isReadResponseBody()
Indicate whenever HTTP client should read the response body for this http requestSome request are not interested in response body, but just in response code.Skip reading body will save HTTP traffic, because HttpClient will download only status code and headers.
-
isDisableCache
boolean isDisableCache()
Indicate if HttpUrlConnection should avoid use caches, effectively set Cache-Control headersee RD-48694
-
isFollowRedirects
boolean isFollowRedirects()
-
-
-
-