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:

https://192.168.2.44:3000/api/test

or

http://jasmine.website.com/api/test

update url , can make api requests.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -