create a axios post i in javascript

index.tsx
// Make a POST request using axios
axios.post('https://api.example.com/post-endpoint', {
    data: {
        key: 'value'
    }
})
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error(error);
});
234 chars
13 lines

related categories

gistlibby LogSnag