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
// Define a function named getJSON that takes a URL and a callback function as parameters | |
var getJSON = function(url, callback) { | |
// Create a new XMLHttpRequest object | |
var xhr = new XMLHttpRequest(); | |
// Open a GET request to the specified URL asynchronously | |
xhr.open('GET', url, true); | |
// Specify the expected response type as JSON | |
xhr.responseType = 'json'; | |
// Define an event handler for when the request completes |
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
{ | |
"/32": 1, | |
"/31": 2, | |
"/30": 4, | |
"/29": 8, | |
"/28": 16, | |
"/27": 32, | |
"/26": 64, | |
"/25": 128, | |
"/24": 256, |
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
[ | |
{ | |
"cidr": "/32", | |
"subnet_mask": "255.255.255.255", | |
"wildcard_mask": "0.0.0.0", | |
"number_of_ip_address": 1 | |
}, | |
{ | |
"cidr": "/31", | |
"subnet_mask": "255.255.255.254", |
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
[ | |
"AK", | |
"AL", | |
"AR", | |
"AZ", | |
"CA", | |
"CO", | |
"CT", | |
"DC", | |
"DE", |
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
{ | |
"AK": "Alaska", | |
"AL": "Alabama", | |
"AR": "Arkansas", | |
"AZ": "Arizona", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DC": "District of Columbia", | |
"DE": "Delaware", |