Created
March 22, 2020 10:00
-
-
Save dbjpanda/a1092b82f08776fa6ab12c850ca79021 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 domainLookup(domain) { | |
var result = ""; | |
if (domain == "") { | |
return; | |
} | |
// Function to lookup available domains using rdap | |
httpResult = UrlFetchApp.fetch("https://rdap.verisign.com/com/v1/domain/"+domain,{muteHttpExceptions: true}); | |
if (httpResult.getResponseCode() == 404) { | |
return "Available"; | |
} | |
else{ | |
return "Not Available" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment