Este teste nao passou. pode me ajudar

Tell us what’s happening:
Describe your issue in detail here.

Your project link(s)

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36

Challenge: Get Data from POST Requests

Link to the challenge:

No myApp.js, confere se ele está com as linhas a seguir:
var bodyParser = require(“body-parser”);
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json())

Essas são as linhas de solicitação e colocação em uso do body-parser.
Depois, faça a solicitação de post sugerida assim:
app.post("/name", function(req, res) {
// Handle the data in the request
var string = req.body.first + " " + req.body.last;
res.json({ name: string });
});

Esse é o post do nome e o retorno dele da resposta.

1 Like

obrigado daniel voce e nota 10.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.