1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-13 14:53:18 +00:00

android http client handler

This commit is contained in:
Kyle Spearrin
2019-06-15 18:44:08 -04:00
parent 58ef292fa7
commit c50dee479a
5 changed files with 19 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
using Bit.Core.Services;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
namespace Bit.Core.Utilities
@@ -11,7 +12,7 @@ namespace Bit.Core.Utilities
public static Dictionary<string, object> RegisteredServices { get; set; } = new Dictionary<string, object>();
public static bool Inited { get; set; }
public static void Init()
public static void Init(HttpClientHandler httpClientHandler = null)
{
if(Inited)
{
@@ -31,7 +32,8 @@ namespace Bit.Core.Utilities
var cryptoFunctionService = new PclCryptoFunctionService(cryptoPrimitiveService);
var cryptoService = new CryptoService(storageService, secureStorageService, cryptoFunctionService);
var tokenService = new TokenService(storageService);
var apiService = new ApiService(tokenService, platformUtilsService, (bool expired) => Task.FromResult(0));
var apiService = new ApiService(tokenService, platformUtilsService, (bool expired) => Task.FromResult(0),
httpClientHandler);
var appIdService = new AppIdService(storageService);
var userService = new UserService(storageService, tokenService);
var settingsService = new SettingsService(userService, storageService);