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

前端 未结 5 624
没有蜡笔的小新
没有蜡笔的小新 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 20:08

    Your "path" variable contains space

    path: ' /users/'+ username +'/repos',

    Instead it should be

    path: '/users/'+ username +'/repos',

提交回复
热议问题