Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit db7e3e4

Browse files
✨ Support for JSON body
1 parent 8ecb06d commit db7e3e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ polka()
3939
})
4040
.post("/", (req, res) => {
4141
// Get data from query and body
42-
const data = { ...req.query, date: new Date() };
42+
const data = { ...req.query, ...req.body, date: new Date() };
4343

4444
// Get user agent details
4545
const userAgent = (req.headers["user-agent"] || "").substring(0, 1000);

0 commit comments

Comments
 (0)