报错信息:
Unhandled rejection RequestError: Error: Invalid URI "xxxxxxxxxxxxxxxxxxx"
at new RequestError (D:\WorkSpace\local-test\node_modules\request-promise-core\lib\errors.js:14:15)
at Request.plumbing.callback (D:\WorkSpace\local-test\node_modules\request-promise-core\lib\plumbing.js:87:29)
at Request.RP$callback [as _callback] (D:\WorkSpace\local-test\node_modules\request-promise-core\lib\plumbing.js:46:31)
at self.callback (D:\WorkSpace\local-test\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request.init (D:\WorkSpace\local-test\node_modules\request\request.js:273:17)
at Request.RP$initInterceptor [as init] (D:\WorkSpace\local-test\node_modules\request-promise-core\configure\request2.js:45:29)
at new Request (D:\WorkSpace\local-test\node_modules\request\request.js:127:8)
at request (D:\WorkSpace\local-test\node_modules\request\index.js:53:10)
at Function.post (D:\WorkSpace\local-test\node_modules\request\index.js:61:12)
at reqtest (D:\WorkSpace\local-test\final.js:63:25)
at Object.<anonymous> (D:\WorkSpace\local-test\final.js:66:1)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
原因:url没有加上域名前缀http://
,导致请求路径错误。