Answer the question
In order to leave comments, you need to log in
How is the data received from the form?
Hello! I came across a series of articles: Easy Node Authentication: Setup and Local . I can not understand how the data is received from the form?
Answer the question
In order to leave comments, you need to log in
If the data goes by the GET method, then the data is received from the address bar, if POST, then request
an event is hung on the object Like data
this
http.createServer(function (req, res) {
if (req.method == "POST" && req.url == "example") {
req.on("data", function (chunk) {
// и здесь все парсится
})
}
}).listen(3000)
and express does it all for you, and stores the data transmitted by the POST method in a property, body
i.e. req.body
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question