Skip to content

Commit 8de99dc

Browse files
committed
Update index.md
1 parent 150a012 commit 8de99dc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

index.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,19 +1312,18 @@ Content-Security-Policy: default-src 'self' *.http://sometrustedwebsite.com
13121312
const express = require("express");
13131313
const app = express();
13141314
const axios = require("axios");
1315-
1315+
13161316
app.post("/user", async (req, res) => {
13171317
try {
1318-
const payload = { name: 'Aashita Iyer', email: 'aashita.iyer@email.com' };
1319-
1320-
const response =await axios.post('http://httpbin.org/post', payload);
1318+
const payload = { name: "Aashita Iyer", email: "aashita.iyer@email.com" };
1319+
const response = await axios.post("http://httpbin.org/post", payload);
13211320
console.log(response.data);
13221321
res.status(200).json(response.data);
13231322
} catch (err) {
13241323
res.status(500).json({ message: err });
13251324
}
13261325
});
1327-
1326+
13281327
app.listen(3000, function () {
13291328
console.log(`App listening at http://localhost:3000/`);
13301329
});

0 commit comments

Comments
 (0)