1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 07:43:37 +00:00

Await async calls after loading. Added ConfigureAwaits throughout API repositories. Formatting.

This commit is contained in:
Kyle Spearrin
2016-08-16 19:20:41 -04:00
parent 83bcd39791
commit 2c05c9595b
16 changed files with 126 additions and 109 deletions

View File

@@ -35,13 +35,13 @@ namespace Bit.App.Repositories
try
{
var response = await client.SendAsync(requestMessage);
var response = await client.SendAsync(requestMessage).ConfigureAwait(false);
if(!response.IsSuccessStatusCode)
{
return await HandleErrorAsync<ListResponse<FolderResponse>>(response);
return await HandleErrorAsync<ListResponse<FolderResponse>>(response).ConfigureAwait(false);
}
var responseContent = await response.Content.ReadAsStringAsync();
var responseContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
var responseObj = JsonConvert.DeserializeObject<ListResponse<FolderResponse>>(responseContent);
return ApiResult<ListResponse<FolderResponse>>.Success(responseObj, response.StatusCode);
}