1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-16 08:13:20 +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

@@ -11,8 +11,10 @@ namespace Bit.App.Repositories
{
public class DeviceApiRepository : ApiRepository<DeviceRequest, DeviceResponse, string>, IDeviceApiRepository
{
public DeviceApiRepository(IConnectivity connectivity)
: base(connectivity)
public DeviceApiRepository(
IConnectivity connectivity,
IHttpService httpService)
: base(connectivity, httpService)
{ }
protected override string ApiRoute => "devices";
@@ -24,7 +26,7 @@ namespace Bit.App.Repositories
return HandledNotConnected();
}
using(var client = new ApiHttpClient())
using(var client = HttpService.Client)
{
var requestMessage = new TokenHttpRequestMessage(request)
{
@@ -56,7 +58,7 @@ namespace Bit.App.Repositories
return HandledNotConnected();
}
using(var client = new ApiHttpClient())
using(var client = HttpService.Client)
{
var requestMessage = new TokenHttpRequestMessage
{