summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/http/HttpRequestUtil.java
blob: 2b85555cc7cddb896ecc5e1dcd769d66ac6bf660 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.mapbox.mapboxsdk.http;

import okhttp3.OkHttpClient;

/**
 * Utility class for setting HttpRequest configurations.
 *
 * @deprecated use {@link com.mapbox.mapboxsdk.module.http.HttpRequestUtil} instead
 */
@Deprecated
public class HttpRequestUtil {

  /**
   * Set the log state of HttpRequest. Default value is true.
   * <p>
   * This configuration will outlast the lifecycle of the Map.
   * </p>
   *
   * @param enabled True will enable logging, false will disable
   * @deprecated use {@link com.mapbox.mapboxsdk.module.http.HttpRequestUtil#setLogEnabled(boolean)} instead
   */
  @Deprecated
  public static void setLogEnabled(boolean enabled) {
    com.mapbox.mapboxsdk.module.http.HttpRequestUtil.setLogEnabled(enabled);
  }

  /**
   * Enable printing of the request url when an error occurred. Default value is false.
   * <p>
   * Requires {@link #setLogEnabled(boolean)} to be activated.
   * </p>
   * <p>
   * This configuration will outlast the lifecycle of the Map.
   * </p>
   *
   * @param enabled True will print urls, false will disable
   * @deprecated use {@link com.mapbox.mapboxsdk.module.http.HttpRequestUtil#setPrintRequestUrlOnFailure(boolean)}
   * instead
   */
  @Deprecated
  public static void setPrintRequestUrlOnFailure(boolean enabled) {
    com.mapbox.mapboxsdk.module.http.HttpRequestUtil.setPrintRequestUrlOnFailure(enabled);
  }

  /**
   * Set the OkHttpClient used for requesting map resources.
   *
   * @param client the OkHttpClient
   * @deprecated use {@link com.mapbox.mapboxsdk.module.http.HttpRequestUtil#setOkHttpClient(OkHttpClient)} instead.
   */
  @Deprecated
  public static void setOkHttpClient(OkHttpClient client) {
    com.mapbox.mapboxsdk.module.http.HttpRequestUtil.setOkHttpClient(client);
  }
}