Skip to content

Instantly share code, notes, and snippets.

@iainsproat
Created September 2, 2022 10:50
Show Gist options
  • Save iainsproat/9c53349341fe7a943293b99d2f0c2c8c to your computer and use it in GitHub Desktop.
Save iainsproat/9c53349341fe7a943293b99d2f0c2c8c to your computer and use it in GitHub Desktop.
reach an http endpoint in a node container without curl
require('http').get({host: '<REPLACE_ME>.<REPLACE_ME>.svc.cluster.local.', path:'/graphql', port:3000}, (resp) => { console.log(resp.statusCode); }).on("error", (err) => { console.log("error: " + err.message);});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment