File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -2649,19 +2649,18 @@ Content-Security-Policy: default-src 'self' *.http://sometrustedwebsite.com
2649
2649
const express = require (" express" );
2650
2650
const app = express ();
2651
2651
const axios = require (" axios" );
2652
-
2652
+
2653
2653
app .post (" /user" , async (req , res ) => {
2654
2654
try {
2655
- const payload = { name: ' Aashita Iyer' , email: ' aashita.iyer@email.com' };
2656
-
2657
- const response = await axios .post (' http://httpbin.org/post' , payload);
2655
+ const payload = { name: " Aashita Iyer" , email: " aashita.iyer@email.com" };
2656
+ const response = await axios .post (" http://httpbin.org/post" , payload);
2658
2657
console .log (response .data );
2659
2658
res .status (200 ).json (response .data );
2660
2659
} catch (err) {
2661
2660
res .status (500 ).json ({ message: err });
2662
2661
}
2663
2662
});
2664
-
2663
+
2665
2664
app .listen (3000 , function () {
2666
2665
console .log (` App listening at http://localhost:3000/` );
2667
2666
});
You can’t perform that action at this time.
0 commit comments