File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ public async Task Send (WnsNotification notification)
6363 var http = new HttpClient ( ) ;
6464
6565 http . DefaultRequestHeaders . TryAddWithoutValidation ( "X-WNS-Type" , string . Format ( "wns/{0}" , notification . Type . ToString ( ) . ToLower ( ) ) ) ;
66- http . DefaultRequestHeaders . TryAddWithoutValidation ( "Authorization" , "Bearer " + accessToken ) ;
66+ if ( ! http . DefaultRequestHeaders . Contains ( "Authorization" ) ) //prevent double values
67+ http . DefaultRequestHeaders . TryAddWithoutValidation ( "Authorization" , "Bearer " + accessToken ) ;
6768
6869 if ( notification . RequestForStatus . HasValue )
6970 http . DefaultRequestHeaders . TryAddWithoutValidation ( "X-WNS-RequestForStatus" , notification . RequestForStatus . Value . ToString ( ) . ToLower ( ) ) ;
You can’t perform that action at this time.
0 commit comments