I hereby claim:
- I am alicancakil on github.
- I am alican (https://keybase.io/alican) on keybase.
- I have a public key ASA0dXdTVkovuunW8kbvJir_Gpt1T1nbEmSP9goyjalB9go
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Resource": "*", | |
"Action": [ | |
"a4b:ListSkills", | |
"access-analyzer:GetAnalyzedResource", | |
"access-analyzer:GetAnalyzer", |
const getContent = function (url) { | |
// return new pending promise | |
return new Promise((resolve, reject) => { | |
// select http or https module, depending on reqested url | |
const lib = url.startsWith('https') ? require('https') : require('http'); | |
const request = lib.get(url, (response) => { | |
// handle http errors | |
if (response.statusCode < 200 || response.statusCode > 299) { | |
reject(new Error('Failed to load page, status code: ' + response.statusCode)); | |
} |
I hereby claim: