Skip to content

Instantly share code, notes, and snippets.

@MeetMartin
Created September 6, 2021 01:23
Show Gist options
  • Save MeetMartin/994bb348b019fadce328155a8d79d059 to your computer and use it in GitHub Desktop.
Save MeetMartin/994bb348b019fadce328155a8d79d059 to your computer and use it in GitHub Desktop.
import axios from 'axios';
cons postToMyApi = payload =>
axios.post(
'/v1/my-api',
{
"request": payload.request
},
{
headers: {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ${payload.token}`
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment