“Node Express JSON -Anfrage urlencodiert” Code-Antworten

Node Express JSON -Anfrage urlencodiert

server.use(express.static(path.join(__dirname, 'public')));
server.use(express.urlencoded({ extended: false }));
server.use(express.json());
server.use('/', HomeRoutes);
server.use('/quotes', QuotesRoutes);
ncabrera

Urlencoded Json Express

var express = require('express')

var app = express()

app.use(express.json()) // for parsing application/json
app.use(express.urlencoded({ extended: true })) // for parsing application/x-www-form-urlencoded

app.post('/profile', function (req, res, next) {
  console.log(req.body)
  res.json(req.body)
})
Healthy Hare

Ähnliche Antworten wie “Node Express JSON -Anfrage urlencodiert”

Fragen ähnlich wie “Node Express JSON -Anfrage urlencodiert”

Weitere verwandte Antworten zu “Node Express JSON -Anfrage urlencodiert” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen