Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

body-parser vs express.json

// Express v4.16.0 onwards
const express = require('express');
// ---
app.use(express.json());


// Before Express v4.16.0
const express = require('express');
const bodyParser = require('body-parser');
// ---
app.use(bodyParser.json());
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
8+1 =