I have a form which uses a GET method. i also have an input with the name 'a'. when i handle the request on the server side (nodejs) i want to be able to use req.body.a (in order to search 'a' in the db). the problem is that the 'req.body' only seems to work with a POST method.
How can i solve this?
If you are using GET
method then the data is sent as query parameters
req.query
By the way there will be no body for GET
method. If you want to send data through body use POST
or PUT
method.
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