node.js - request promise: invalid url -
when use node js request-promise function following parameters, error: invalid uri. can please help
var request = require('request-promise'); request({ method: 'get', url: '/api/test
/api/test path on server
as error says url path incorrect. url requires
protocol(http/https in case)://ip-address/domain-name:port(optional if configured in nginx)/route-to-api-endpoint.
example:
or
update url , can make api requests.
Comments
Post a Comment