草庐IT

Unescaped

全部标签

node.js - TypeError : Request path contains unescaped characters, 我该如何解决这个问题

/*Makinghttprequesttotheapi(Github)createrequestparseresponcewrapinafunction*/varhttps=require("https");varusername='lynndor';//CREATINGANOBJECTvaroptions={host:'api.github.com',path:'/users/'+username+'/repos',method:'GET'};varrequest=https.request(options,function(responce){varbody=''responce.

javascript - 类型错误 : Request path contains unescaped characters

我尝试使用以下方式安装node.js模块:npminstallexpress但我收到此错误:npmhttpGEThttps://registry.npmjs.org/expressnpmERR!TypeError:Requestpathcontainsunescapedcharacters.npmERR!atAgent.request(_http_agent.js:264:11)npmERR!atTunnelingAgent.exports.request(http.js:52:22)npmERR!atTunnelingAgent.createSocket(/usr/local/lib
12