File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -74,14 +74,14 @@ static async Task Main(string[] args)
7474 private static async Task < string > Authenticate ( )
7575 {
7676 Console . WriteLine ( $ "Authenticating as { Environment . UserName } ...") ;
77- var httpClient = new HttpClient ( ) ;
78- var request = new HttpRequestMessage
77+ using var httpClient = new HttpClient ( ) ;
78+ using var request = new HttpRequestMessage
7979 {
8080 RequestUri = new Uri ( $ "{ Address } /generateJwtToken?name={ HttpUtility . UrlEncode ( Environment . UserName ) } ") ,
8181 Method = HttpMethod . Get ,
8282 Version = new Version ( 2 , 0 )
8383 } ;
84- var tokenResponse = await httpClient . SendAsync ( request ) ;
84+ using var tokenResponse = await httpClient . SendAsync ( request ) ;
8585 tokenResponse . EnsureSuccessStatusCode ( ) ;
8686
8787 var token = await tokenResponse . Content . ReadAsStringAsync ( ) ;
You can’t perform that action at this time.
0 commit comments