Saturday 29 April 2017

get wrong paramer from get method in nodejs

i'm trying to send get method request and want to pass value in URL like my api look like

app.get('/api/getlocation/:customerName', customer.getlocation);

for call this i wrote on postman

localhost:8080/api/getlocation/:customerName=kumbhani

for test

var customerName = req.params.customerName;
console.log('name', customerName); // =kumbhani

it give me name with = sign i want only kumbhani



via kumbhani Bhavesh

No comments:

Post a Comment