Skip to content

Instantly share code, notes, and snippets.

@rotimi-best
Created December 21, 2020 16:59
Show Gist options
  • Save rotimi-best/26a85b82b602987a7fc1bc66b2c28d1f to your computer and use it in GitHub Desktop.
Save rotimi-best/26a85b82b602987a7fc1bc66b2c28d1f to your computer and use it in GitHub Desktop.

Revisions

  1. rotimi-best created this gist Dec 21, 2020.
    8 changes: 8 additions & 0 deletions fetch.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    fetch('https://httpbin.org/post', {
    method: 'POST',
    headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json'
    },
    body: JSON.stringify({a: 1, b: 'Textual content'})
    });