Skip to content

Instantly share code, notes, and snippets.

@botic
Created July 9, 2015 08:02
Show Gist options
  • Select an option

  • Save botic/437dfb79c5dcab88221c to your computer and use it in GitHub Desktop.

Select an option

Save botic/437dfb79c5dcab88221c to your computer and use it in GitHub Desktop.
TLS/SSL with Ringo's HTTP client
var {get, request} = require("ringo/httpclient");
// Using get
var exchange = get("https://www.washingtonpost.com/");
console.log(exchange.status);
// Using the more generic request function
exchange = request({
url: "https://www.washingtonpost.com/",
method: "GET"
});
console.log(exchange.status); // 200
console.log(exchange.content); // HTML content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment