`How to store a GET request in a variable?
S
S
squadbrodyaga2020-11-03 14:09:20
Node.js
squadbrodyaga, 2020-11-03 14:09:20

How to store a GET request in a variable?

Hello, in general, I want to know how to put a GET request into a variable, like:

router.get(`/signup/ref=?????`, (req, res) => {
     // мне нужно знать, что написано после /ref=
})

Is there such a possibility?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hzzzzl, 2020-11-03
@squadbrodyaga

https://www.geeksforgeeks.org/express-js-req-param...

router.get(`/signup/ref/:ref`, (req, res) => {
     console.log(req.params.ref)
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question