Skip to content

Instantly share code, notes, and snippets.

@warrenkc
Created June 24, 2022 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warrenkc/8ad197a1a128ec8200f3c87ef21cae01 to your computer and use it in GitHub Desktop.
Save warrenkc/8ad197a1a128ec8200f3c87ef21cae01 to your computer and use it in GitHub Desktop.
Sample C# code for Uptime Robot Heartbeat Monitor
var client = new HttpClient();
// Heartbeat URL
const string url = "https://heartbeat.uptimerobot.com/YOUR CODE HERE";
// Get the response.
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine(response.StatusCode);
// Get the response content.
_ = response.Content;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment