I need to send an array of user names in GET request as parameters, say
/show_user/?uname=user1&uname=user2&uname=user3&uname=user4
and then inside the express server.js file can I retrieve it as:
var username = req.query.uname; //['user1', 'user2','user3','user4']
Will this work?
Yes. Just send the attribute as your are doing and on the express side you can pull it out as
var username = req.query.uname; //['user1', 'user2','user3','user4']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With