Skip to content

Instantly share code, notes, and snippets.

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 dingman/25f9b6dec84a2950ddd086ee42b7d9b3 to your computer and use it in GitHub Desktop.
Save dingman/25f9b6dec84a2950ddd086ee42b7d9b3 to your computer and use it in GitHub Desktop.
function checkHttpStatus(url) {
if (!url) {
return 'No URL';
}
try {
var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true});
return response.getResponseCode();
} catch (e) {
return "Error";
}
}
// Use this function in your sheet as =checkHttpStatus(A1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment