HttpRequest
public class HttpRequestImpl extends java.lang.Object implements HttpRequest
CONNECTION_ERROR, PERMANENT_ERROR, TEMPORARY_ERROR
Constructor | Description |
---|---|
HttpRequestImpl() |
Modifier and Type | Method | Description |
---|---|---|
void |
cancelRequest() |
Cancels the request.
|
static void |
enableLog(boolean enabled) |
|
static void |
enablePrintRequestUrlOnFailure(boolean enabled) |
|
void |
executeRequest(HttpResponder httpRequest,
long nativePtr,
java.lang.String resourceUrl,
java.lang.String etag,
java.lang.String modified,
boolean offlineUsage) |
Executes the request.
|
static void |
setOkHttpClient(okhttp3.OkHttpClient okHttpClient) |
public void executeRequest(HttpResponder httpRequest, long nativePtr, @NonNull java.lang.String resourceUrl, @NonNull java.lang.String etag, @NonNull java.lang.String modified, boolean offlineUsage)
HttpRequest
executeRequest
in interface HttpRequest
httpRequest
- callback to be invoked when we receive a responsenativePtr
- the pointer associated to the requestresourceUrl
- the resource url to downloadetag
- http header, identifier for a specific version of a resourcemodified
- http header, used to determine if a resource hasn't been modified sinceofflineUsage
- flag to indicate a resource will be used for offline, appends offline=true as a query parameterpublic void cancelRequest()
HttpRequest
cancelRequest
in interface HttpRequest
public static void enablePrintRequestUrlOnFailure(boolean enabled)
public static void enableLog(boolean enabled)
public static void setOkHttpClient(@Nullable okhttp3.OkHttpClient okHttpClient)