steves / node-jira

A nodejs wrapper for the JIRA REST API
378 stars 169 forks source link

protocol.charCodeAt is not a function #150

Closed Nikhil22 closed 6 years ago

Nikhil22 commented 6 years ago

I get protocol.charCodeAt is not a function when I try to make any call.

Example:

var jira = new JiraApi({ protocol : 'https', host : 'ethtask2.atlassian.net', port : 443 , user : 'someUsername', password : 'somePassword' , version : '2', base : 'jira' });

Obviously I replaced someUsername and somePassword with the real stuff.

Then when I call listProjects, for example:

jira.listProjects(function(s, e) { console.log('s', s) console.log('e', e) res.send('a') })

I get the error protocol.charCodeAt is not a function

This happens for other calls too, like findIssue. Any ideas?

Nikhil22 commented 6 years ago

Turns out I can't pass in an object, but rather var jira = new JiraApi( 'https', 'ethtask2.atlassian.net', 443, 'someUser', 'somePassword', '2', 'jira' );

Closing.