Browse files

updated HTTPS usage in PubNub NodeJS API.

  • Loading branch information...
1 parent 54ac875 commit 29e34a018c1043fe735a3a20d7cbd0d154830d4f @stephenlb stephenlb committed Feb 13, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −1 nodejs/examples/usage.js
  2. +1 −1 nodejs/package.json
  3. +2 −1 nodejs/pubnub.js
View
2 nodejs/examples/usage.js
@@ -9,7 +9,7 @@ var network = pubnub.init({
publish_key : "demo",
subscribe_key : "demo",
secret_key : "",
- ssl : false,
+ ssl : true,
origin : "pubsub.pubnub.com"
});
View
2 nodejs/package.json
@@ -1,7 +1,7 @@
{
"name": "pubnub",
"preferGlobal": false,
- "version": "3.1.7",
+ "version": "3.1.8",
"author": "Pubnub <stephen@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
View
3 nodejs/pubnub.js
@@ -35,6 +35,7 @@ THE SOFTWARE.
*/
var NOW = 1
, http = require('http')
+, https = require('https')
, URLBIT = '/'
, XHRTME = 140000
, XORIGN = 1;
@@ -113,7 +114,7 @@ function xdr( setup ) {
};
try {
- http.get( {
+ (ssl ? https : http).get( {
host : origin,
port : ssl ? 443 : 80,
path : url

0 comments on commit 29e34a0

Please sign in to comment.