Class HttpRequestImpl
java.lang.Object
com.trimblemaps.mapsdk.module.http.HttpRequestImpl
- All Implemented Interfaces:
HttpRequest
-
Field Summary
Fields inherited from interface com.trimblemaps.mapsdk.http.HttpRequest
CONNECTION_ERROR, PERMANENT_ERROR, TEMPORARY_ERROR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels the request.static voidenableLog(boolean enabled) static voidenablePrintRequestUrlOnFailure(boolean enabled) voidexecuteRequest(HttpResponder httpRequest, long nativePtr, String resourceUrl, String etag, String modified, boolean offlineUsage) Executes the request.static voidsetOkHttpClient(okhttp3.OkHttpClient okHttpClient)
-
Constructor Details
-
HttpRequestImpl
public HttpRequestImpl()
-
-
Method Details
-
executeRequest
public void executeRequest(HttpResponder httpRequest, long nativePtr, @NonNull String resourceUrl, @NonNull String etag, @NonNull String modified, boolean offlineUsage) Description copied from interface:HttpRequestExecutes the request.- Specified by:
executeRequestin interfaceHttpRequest- Parameters:
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 parameter
-
cancelRequest
public void cancelRequest()Description copied from interface:HttpRequestCancels the request.- Specified by:
cancelRequestin interfaceHttpRequest
-
enablePrintRequestUrlOnFailure
public static void enablePrintRequestUrlOnFailure(boolean enabled) -
enableLog
public static void enableLog(boolean enabled) -
setOkHttpClient
public static void setOkHttpClient(@Nullable okhttp3.OkHttpClient okHttpClient)
-