Created
August 24, 2023 15:41
-
-
Save magnum/c010e04c02935ddd292d8421f322de2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function HTTPResponse( uri ) { | |
var response_code ; | |
var options = { | |
'validateHttpsCertificates' : false | |
}; | |
try { | |
response_code = UrlFetchApp .fetch( uri, options ) .getResponseCode() .toString() ; | |
} | |
catch( error ) { | |
response_code = error .toString() //.match( / returned code (\d\d\d)\./ )[1] ; | |
} | |
finally { | |
return response_code ; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment