Skip to content

Instantly share code, notes, and snippets.

@ByteDev
Last active July 16, 2021 10:02
Show Gist options
  • Save ByteDev/3dfc8f3982fab9995a1870215a57bfaf to your computer and use it in GitHub Desktop.
Save ByteDev/3dfc8f3982fab9995a1870215a57bfaf to your computer and use it in GitHub Desktop.
var response = await client.SendAsync(request);

if (response.StatusCode == HttpStatusCode.Unauthorized)
{
    // need to refresh the request security token!
}

if (response.IsSuccessStatusCode)
{
    // the status code was 2xx
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment