/*Making http request to the api (Git hub)
create request
parse responce
wrap in a function
*/
var https = require(\"https\");
var username = \'lynndor\';
//CREATIN
I was getting this error while trying to hit Elasticsearch's API. For me, it was due to Chinese characters in the Document's Title (in the Request I was sending). Switching to all English characters fixed the issue.