Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

request body empty express

const express = require('express')
const app = express()

app.use(express.json())

// demo post endpoint
app.post('/submit', async (req, res) => {
	let data = req.body // getting the body request
    
    res.json(data)
}) 
 
PREVIOUS NEXT
Tagged: #request #body #empty #express
ADD COMMENT
Topic
Name
7+6 =