axios js used for code example
Example 1: axios get
import axios from 'axios';
await axios.get('/user', {
params: {
ID: 12345
}
})
Example 2: axios put
const res = await axios.put('https://httpbin.org/put', { hello: 'world' });
res.data.headers['Content-Type']; // application/json;charset=utf-8