Created
September 6, 2021 01:23
-
-
Save MeetMartin/994bb348b019fadce328155a8d79d059 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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