-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using https protocol with REST Client #1
Comments
Hi you don't need to pass the "protocol" as an option to the client. If you var Client = require('node-rest-client').Client // call "https" site using the way you prefer between the ones client has // direct way If you need to add basic auth to each call just pass username and password var Client = require('node-rest-client'); } var client = new Client(auth_options); as you can see in documentation "protocol" is not an allowed option for the Options parameters You can pass the following args when creating a new client: var options ={ Hope it helps On Wed, Apr 24, 2013 at 4:13 AM, Cristian Bullokles <
|
That was my first test, without any options... in fact my initial code is: var sys = require('util'); var client = new Client(); var args ={ client.get("https://api.forecast.io/forecast/${apikey}/${lat},${lon}", args, http.js:1604 On Thu, Apr 25, 2013 at 5:43 PM, Alejandro Alvarez Acero <
|
Hi I've been reviewing the code and you were right. There was a problem with options passed to http/https libs in node.js probably due to a new version of those libs. Anyway, I've fixed the code (and test it with the url of your example) and publish the update to github and npm as version 0.0.3. hope now it works for you. |
I'm trying to call Client using the next code:
Client = require('node-rest-client').Client;
var options = { protocol: "https"};
var client = new Client(options);
But I'm receiving the error below:
http.js:1604
throw new Error('Protocol:' + options.protocol + ' not supported.');
^
Error: Protocol:https: not supported.
at Object.exports.request (http.js:1604:11)
The text was updated successfully, but these errors were encountered: