TypeError: Request path contains unescaped characters, how can I fix this

前端 未结 5 626
没有蜡笔的小新
没有蜡笔的小新 2021-01-03 19:18
/*Making http request to the api (Git hub)
create request
parse responce
wrap in a function
*/
var https = require(\"https\");

var username = \'lynndor\';
//CREATIN         


        
5条回答
  •  悲哀的现实
    2021-01-03 19:54

    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.

提交回复
热议问题