Skip to content

Instantly share code, notes, and snippets.

@jaydenlin
Last active December 30, 2020 11:09
Show Gist options
  • Save jaydenlin/0723a3606fd6324cb34d87df5ebabc0a to your computer and use it in GitHub Desktop.
Save jaydenlin/0723a3606fd6324cb34d87df5ebabc0a to your computer and use it in GitHub Desktop.
app.post(`/api/:userId/posts`, async (req, res) => {
const token = await tokenService.getToken(req);
const response = await api.post(`http://internal.corp.com/${req.params.userId}/posts?message=${req.query.message}&token=${token}`);
return res.send(response.data);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment