main.cs542 chars22 lines
This C# code uses HttpClient
to make numCalls
requests to an API endpoint that would always return HTTP 418 status code. The async
and await
keywords are used to allow other actions to continue while the calls to the API are being made. The loop prints out the HTTP status code of each returned response in the console.
gistlibby LogSnag