M
M
Michael Someone2021-08-10 12:47:21
Express.js
Michael Someone, 2021-08-10 12:47:21

How to work with a link that ends with "?a="?

Hello.

When I do this

app.get('/testa?a=:abc', (req, res) => {
    res.send(req.params.abc)
})


It doesn't work for me and I don't understand why.

I need to output from ?a= what I indicated in the link line, but the browser just gives me Cannot GET /testa

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rama_jecboom, 2021-08-10
@TrotorNo

request.query

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question