how to check request method was a get
import axios from 'axios';
const Api = axios.create({
baseURL: 'https://example/',
});
Api.interceptors.response.use(response => {
if (response.data.message && response.request._method !== 'GET') {
console.log(response.data.message);
}
return response;
},