Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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)
})
Source by expressjs.com #
 
PREVIOUS NEXT
Tagged: #urlencoded #json #express
ADD COMMENT
Topic
Name
1+5 =