com.xd.sdk.report 7.0.2 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,29 @@ namespace XD.SDK.Report.Internal
28
28
  () => XDHttpClientFactory.CreateBasicClient(XDGHost.CreateBaseHost(XDGCommonInternal.IsCn())))
29
29
  );
30
30
 
31
- private static IHttpClient HttpClient => DefaultClient.Value;
31
+ private static IHttpClient HttpClient => CreateClient();
32
+
33
+ public static IHttpClient CreateClient(XDGHost host = null)
34
+ {
35
+ host = host ?? XDGHost.CreateBaseHost(XDGCommonInternal.IsCn());
36
+ #if UNITY_STANDALONE
37
+ var commonInterceptor = new Common.Internal.Standalone.CommonParamsInterceptor();
38
+ var macInterceptor = new XD.SDK.Common.Internal.Standalone.Http.Interceptor.MacAuthenticationInterceptor();
39
+ #else
40
+ var macInterceptor = new XD.SDK.Account.Internal.Mobile.MacAuthenticationInterceptor();
41
+ var commonInterceptor = new Common.Internal.Mobile.CommonParamsInterceptor();
42
+ #endif
43
+
44
+ return XDHttpClientFactory.CreateClient(host, builder =>
45
+ {
46
+ builder
47
+ .Timeout(TimeSpan.FromSeconds(10))
48
+ .WithLogging()
49
+ .AddInterceptor(commonInterceptor)
50
+ .AddInterceptor(new UrlBuildInterceptor())
51
+ .AddInterceptor(macInterceptor);
52
+ });
53
+ }
32
54
 
33
55
  private XDReportImpl()
34
56
  {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "com.xd.sdk.report",
3
3
  "displayName": "XDGSDK Report",
4
- "version": "7.0.2",
4
+ "version": "7.1.1",
5
5
  "description": "XDGSDK",
6
6
  "unity": "2019.3",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "com.xd.sdk.account": "7.0.2",
10
- "com.xd.sdk.common": "7.0.2"
9
+ "com.xd.sdk.account": "7.1.1",
10
+ "com.xd.sdk.common": "7.1.1"
11
11
  }
12
12
  }