axios
npm i axios
axios
npm i axios
axios
const { data } = await axios({
method: 'post',
url: `${process.env.REACT_APP_API_URL}/api/send-otp`,
data: { phone: phoneNumber },
//withCredentials: true,
})
console.log(data)
Axios get
const axios = require('axios');
async function makeGetRequest() {
let res = await axios.get('http://webcode.me');
let data = res.data;
console.log(data);
}
makeGetRequest();
axios post
axios.post('https:sample-endpoint.com/user', {
Name: 'Fred',
Age: '23'
})
.then(function (response) {
console.log(response);
})
axios
$ yarn add axios
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us