You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Why? The server that processes auth tokens currently only accepts the *exact* string, even if it's invalid for a URL.
* Properly url-encoding percent characters causes it to reject the token.
* So, this is a custom qs.stringify function that properly encodes everything except watson-token, passing it along verbatim
*
* @param {Object} queryParams
* @return {String}
*/
exports.stringify=functionstringify(queryParams){
returnObject.keys(queryParams)
.map(function(key){
returnkey+'='+(key==='watson-token' ? queryParams[key] : encodeURIComponent(queryParams[key]));// the server chokes if the token is correctly url-encoded