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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user