Skip to content

Instantly share code, notes, and snippets.

@ByteDev
Last active July 16, 2021 09:10
Show Gist options
  • Save ByteDev/a8650f0df53446bb398ddfdbb7c9da85 to your computer and use it in GitHub Desktop.
Save ByteDev/a8650f0df53446bb398ddfdbb7c9da85 to your computer and use it in GitHub Desktop.
var client = new HttpClient(new UnauthorizedResponseHandler());

var response = await client.GetAsync("https://www.google.com/");

// response.StatusCode == HttpStatusCode.Unauthorized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment