Created
January 27, 2019 11:05
-
-
Save carlrip/2e6ac7fe632841ffe2acfa9db9de1c1d to your computer and use it in GitHub Desktop.
POST using http
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const response = await http<{ id: number }>( | |
new Request("https://jsonplaceholder.typicode.com/posts", { | |
method: "post", | |
body: JSON.stringify({ title: "my post", body: "some content" }) | |
}) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment