Created
July 9, 2015 08:02
-
-
Save botic/437dfb79c5dcab88221c to your computer and use it in GitHub Desktop.
TLS/SSL with Ringo's HTTP client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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