diff --git a/lib/linkedin_client.js b/lib/linkedin_client.js index f24261c..8c3848b 100644 --- a/lib/linkedin_client.js +++ b/lib/linkedin_client.js @@ -19,12 +19,12 @@ module.exports = function (key, secret, redirect) { , redirect , 'HMAC-SHA1' , null - , {'Accept': '*/*', 'Connection': 'close'} + , {'Accept': '*/*', 'Connection': 'close', 'x-li-format': 'json'} ) } , paramAppender = "?" , hasParameters = /\/*\?/i - , _rest_base = 'http://api.linkedin.com/v1'; + , _rest_base = 'https://api.linkedin.com/v1'; memoize[key + secret + redirect] = CLIENT; @@ -58,11 +58,10 @@ module.exports = function (key, secret, redirect) { } if (method.toUpperCase() === 'GET') { - params.format = 'json'; - - if (path.match(hasParameters)) { + + if (path.match(hasParameters)) { paramAppender = "&"; - } + } return CLIENT.oauth.get( _rest_base + path + paramAppender + querystring.stringify(params)