@@ -68,7 +68,7 @@ public async Task<AuthorizationResult> AuthorizeAsync(string code)
6868 AuthorizationCode = code ,
6969 } ;
7070 var response = await GetResponse ( OAuthTokenProxyUrl ,
71- HttpMethod . Post , content : tokenRequest , contentType : "application/x-www-form-urlencoded" ) . ConfigureAwait ( false ) ;
71+ HttpMethod . Post , content : tokenRequest , contentType : "application/x-www-form-urlencoded" ) ;
7272 if ( response . IsSuccessStatusCode )
7373 {
7474 var responseContent = await response . Content . ReadAsStringAsync ( ) ;
@@ -108,7 +108,7 @@ public async Task<IEnumerable<Property>> GetContactPropertiesAsync()
108108
109109 var requestUrl = $ "{ CrmV3ApiBaseUrl } properties/contacts";
110110 var httpMethod = HttpMethod . Get ;
111- var response = await GetResponse ( requestUrl , httpMethod , authenticationDetails ) . ConfigureAwait ( false ) ;
111+ var response = await GetResponse ( requestUrl , httpMethod , authenticationDetails ) ;
112112 if ( response . IsSuccessStatusCode == false )
113113 {
114114 var retryResult = await HandleFailedRequest ( response . StatusCode , requestUrl , httpMethod , authenticationDetails ) ;
@@ -190,7 +190,7 @@ public async Task<CommandResult> PostContactAsync(Record record, List<MappedProp
190190 // https://api.hubapi.com/crm/v3/objects/contacts?hapikey=YOUR_HUBSPOT_API_KEY
191191 var requestUrl = $ "{ CrmV3ApiBaseUrl } objects/contacts";
192192 var httpMethod = HttpMethod . Post ;
193- var response = await GetResponse ( requestUrl , httpMethod , authenticationDetails , propertiesRequestV3 , JsonContentType ) . ConfigureAwait ( false ) ;
193+ var response = await GetResponse ( requestUrl , httpMethod , authenticationDetails , propertiesRequestV3 , JsonContentType ) ;
194194
195195 // Depending on POST status fail or mark workflow as completed
196196 if ( response . IsSuccessStatusCode == false )
@@ -235,7 +235,7 @@ private async Task<CommandResult> UpdateContactAsync(Record record, Authenticati
235235 // It uses the V1 API but support suggests it will be added to V3 before being depreciated so we can use safely:
236236 // https://community.hubspot.com/t5/APIs-Integrations/Get-Contacts-from-contact-list-using-email/m-p/419493/highlight/true#M41567
237237 var requestUrl = $ "{ CrmApiHost } /contacts/v1/contact/email/{ email } /profile";
238- var response = await GetResponse ( requestUrl , HttpMethod . Post , authenticationDetails , postData , JsonContentType ) . ConfigureAwait ( false ) ;
238+ var response = await GetResponse ( requestUrl , HttpMethod . Post , authenticationDetails , postData , JsonContentType ) ;
239239 if ( response . IsSuccessStatusCode == false )
240240 {
241241 var retryResult = await HandleFailedRequest ( response . StatusCode , requestUrl , HttpMethod . Post , authenticationDetails , postData , JsonContentType ) ;
@@ -308,7 +308,7 @@ private async Task<string> GetOAuthAccessTokenFromCacheOrRefreshToken(string ref
308308 if ( accessToken != null )
309309 {
310310 // No access token in the cache, so get a new one from the refresh token.
311- await RefreshOAuthAccessToken ( refreshToken ) . ConfigureAwait ( false ) ;
311+ await RefreshOAuthAccessToken ( refreshToken ) ;
312312 accessToken = _appCaches . RuntimeCache . Get ( AccessTokenCacheKey ) . ToString ( ) ;
313313 }
314314
@@ -323,7 +323,7 @@ private async Task RefreshOAuthAccessToken(string refreshToken)
323323 RedirectUrl = OAuthRedirectUrl ,
324324 RefreshToken = refreshToken ,
325325 } ;
326- var response = await GetResponse ( OAuthTokenProxyUrl , HttpMethod . Post , content : tokenRequest , contentType : "application/x-www-form-urlencoded" ) . ConfigureAwait ( false ) ;
326+ var response = await GetResponse ( OAuthTokenProxyUrl , HttpMethod . Post , content : tokenRequest , contentType : "application/x-www-form-urlencoded" ) ;
327327 if ( response . IsSuccessStatusCode )
328328 {
329329 var responseContent = await response . Content . ReadAsStringAsync ( ) ;
@@ -382,12 +382,12 @@ private async Task<HttpResponseMessage> GetResponse(
382382 case AuthenticationMode . OAuth :
383383 requestMessage . Headers . Authorization =
384384 new AuthenticationHeaderValue ( "Bearer" ,
385- await GetOAuthAccessTokenFromCacheOrRefreshToken ( authenticationDetails . RefreshToken ) . ConfigureAwait ( false ) ) ;
385+ await GetOAuthAccessTokenFromCacheOrRefreshToken ( authenticationDetails . RefreshToken ) ) ;
386386 break ;
387387 }
388388 }
389389
390- return await httpClient . SendAsync ( requestMessage ) . ConfigureAwait ( false ) ;
390+ return await httpClient . SendAsync ( requestMessage ) ;
391391 }
392392
393393 private static HttpContent CreateRequestContent ( object data , string contentType )
@@ -430,7 +430,7 @@ private async Task<HandleFailedRequestResult> HandleFailedRequest(
430430 await RefreshOAuthAccessToken ( authenticationDetails . RefreshToken ) ;
431431
432432 // Repeat the operation using the refreshed token.
433- var response = await GetResponse ( requestUrl , httpMethod , authenticationDetails , content , contentType ) . ConfigureAwait ( false ) ;
433+ var response = await GetResponse ( requestUrl , httpMethod , authenticationDetails , content , contentType ) ;
434434 if ( response . IsSuccessStatusCode )
435435 {
436436 result . Success = true ;
0 commit comments