private static async Task <T> BinaryResponseToObjectAsync <T>(HttpResponseMessage response) { using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) { return(RestClientHelper.DeserializeBinaryObject <T>(responseStream)); } }