Skip to content

Instantly share code, notes, and snippets.

@jamescarr
Created October 30, 2013 12:21
Show Gist options
  • Select an option

  • Save jamescarr/7231739 to your computer and use it in GitHub Desktop.

Select an option

Save jamescarr/7231739 to your computer and use it in GitHub Desktop.
https = require 'https'
fs = require 'fs'
options =
host: 172.42.1.62
port: 4242
method: 'GET'
path: '/containers/json'
key: fs.readFileSync('ssl/client.key')
cert: fs.readFileSync('ssl/client.crt')
headers: { 'Accept': 'application/json'} # not required, but being semantic here!
req = https.request options, (res) ->
console.log res
req.end()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment