how to pass params in request.get?
why can't pass params like jquery?
$.get("xxx.com", { name:"Donald", remarks:"Ducktown" });
You append them to the url:
xxx.com?name=Donald&remarks=Ducktown
But, if i have a params like object, and i must parse it as string.
@chenby
You can pass them as the query string (qs) parameters:
request.get('xxx.com', {qs: {
name: 'Donald',
remarks: 'Ducktown'
}}, (err, res, body) => {
...
})
Most helpful comment
@chenby
You can pass them as the query string (qs) parameters: