@@ -68,7 +68,7 @@ public async Task<AuthorizationResult> AuthorizeAsync(string code)
68
68
AuthorizationCode = code ,
69
69
} ;
70
70
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" ) ;
72
72
if ( response . IsSuccessStatusCode )
73
73
{
74
74
var responseContent = await response . Content . ReadAsStringAsync ( ) ;
@@ -108,7 +108,7 @@ public async Task<IEnumerable<Property>> GetContactPropertiesAsync()
108
108
109
109
var requestUrl = $ "{ CrmV3ApiBaseUrl } properties/contacts";
110
110
var httpMethod = HttpMethod . Get ;
111
- var response = await GetResponse ( requestUrl , httpMethod , authenticationDetails ) . ConfigureAwait ( false ) ;
111
+ var response = await GetResponse ( requestUrl , httpMethod , authenticationDetails ) ;
112
112
if ( response . IsSuccessStatusCode == false )
113
113
{
114
114
var retryResult = await HandleFailedRequest ( response . StatusCode , requestUrl , httpMethod , authenticationDetails ) ;
@@ -190,7 +190,7 @@ public async Task<CommandResult> PostContactAsync(Record record, List<MappedProp
190
190
// https://api.hubapi.com/crm/v3/objects/contacts?hapikey=YOUR_HUBSPOT_API_KEY
191
191
var requestUrl = $ "{ CrmV3ApiBaseUrl } objects/contacts";
192
192
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 ) ;
194
194
195
195
// Depending on POST status fail or mark workflow as completed
196
196
if ( response . IsSuccessStatusCode == false )
@@ -235,7 +235,7 @@ private async Task<CommandResult> UpdateContactAsync(Record record, Authenticati
235
235
// It uses the V1 API but support suggests it will be added to V3 before being depreciated so we can use safely:
236
236
// https://community.hubspot.com/t5/APIs-Integrations/Get-Contacts-from-contact-list-using-email/m-p/419493/highlight/true#M41567
237
237
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 ) ;
239
239
if ( response . IsSuccessStatusCode == false )
240
240
{
241
241
var retryResult = await HandleFailedRequest ( response . StatusCode , requestUrl , HttpMethod . Post , authenticationDetails , postData , JsonContentType ) ;
@@ -308,7 +308,7 @@ private async Task<string> GetOAuthAccessTokenFromCacheOrRefreshToken(string ref
308
308
if ( accessToken != null )
309
309
{
310
310
// 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 ) ;
312
312
accessToken = _appCaches . RuntimeCache . Get ( AccessTokenCacheKey ) . ToString ( ) ;
313
313
}
314
314
@@ -323,7 +323,7 @@ private async Task RefreshOAuthAccessToken(string refreshToken)
323
323
RedirectUrl = OAuthRedirectUrl ,
324
324
RefreshToken = refreshToken ,
325
325
} ;
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" ) ;
327
327
if ( response . IsSuccessStatusCode )
328
328
{
329
329
var responseContent = await response . Content . ReadAsStringAsync ( ) ;
@@ -382,12 +382,12 @@ private async Task<HttpResponseMessage> GetResponse(
382
382
case AuthenticationMode . OAuth :
383
383
requestMessage . Headers . Authorization =
384
384
new AuthenticationHeaderValue ( "Bearer" ,
385
- await GetOAuthAccessTokenFromCacheOrRefreshToken ( authenticationDetails . RefreshToken ) . ConfigureAwait ( false ) ) ;
385
+ await GetOAuthAccessTokenFromCacheOrRefreshToken ( authenticationDetails . RefreshToken ) ) ;
386
386
break ;
387
387
}
388
388
}
389
389
390
- return await httpClient . SendAsync ( requestMessage ) . ConfigureAwait ( false ) ;
390
+ return await httpClient . SendAsync ( requestMessage ) ;
391
391
}
392
392
393
393
private static HttpContent CreateRequestContent ( object data , string contentType )
@@ -430,7 +430,7 @@ private async Task<HandleFailedRequestResult> HandleFailedRequest(
430
430
await RefreshOAuthAccessToken ( authenticationDetails . RefreshToken ) ;
431
431
432
432
// 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 ) ;
434
434
if ( response . IsSuccessStatusCode )
435
435
{
436
436
result . Success = true ;
0 commit comments