Skip to content

Instantly share code, notes, and snippets.

@kepta

kepta/block22.js Secret

Last active February 21, 2018 15:09
Show Gist options
  • Save kepta/18166054ef0615a13637021d34e7e9ba to your computer and use it in GitHub Desktop.
Save kepta/18166054ef0615a13637021d34e7e9ba to your computer and use it in GitHub Desktop.
request(opts)
.catch(err => {
if (err.statusCode === 400) {
return request(opts);
}
})
.then(r => r.text())
.catch(err => console.erro(err));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment