axios get url code example
Example 1: Using axios send a GET request to the address:
// Send a POST request
axios({
method: 'post',
url: '/user/12345',
data: {
firstName: 'Fred',
lastName: 'Flintstone'
}
});
Example 2: include axios
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
Example 3: axios put
const res = await axios.put('https://httpbin.org/put', { hello: 'world' });
res.data.headers['Content-Type']; // application/json;charset=utf-8