1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-30 23:23:38 +00:00

HttpService abstraction with CustomAndroidClientHandler to handle xamarin android bug with error response body

This commit is contained in:
Kyle Spearrin
2016-12-24 10:54:18 -05:00
parent 62cef0d141
commit 9682abdded
19 changed files with 871 additions and 31 deletions

View File

@@ -5,17 +5,20 @@ using System.Threading.Tasks;
using Bit.App.Models.Api;
using Newtonsoft.Json;
using Plugin.Connectivity.Abstractions;
using Bit.App.Abstractions;
namespace Bit.App.Repositories
{
public abstract class BaseApiRepository
{
public BaseApiRepository(IConnectivity connectivity)
public BaseApiRepository(IConnectivity connectivity, IHttpService httpService)
{
Connectivity = connectivity;
HttpService = httpService;
}
protected IConnectivity Connectivity { get; private set; }
protected IHttpService HttpService { get; private set; }
protected abstract string ApiRoute { get; }
protected ApiResult HandledNotConnected()