Я использую топор ios в моем приложении React-Native.
. Сначала настройте заголовки
function configHeaders()
{
// I tested all these below 3 lines , no on worked
axios.defaults.headers.common["Pragma"] = "no-cache";
axios.defaults.headers.common["Cache-Control"] = "no-cache";
axios.defaults.headers.common["Cache-Control"] = "no-store";
}
. Данные, возвращаемые из запроса ниже, являются старыми, а не текущими данными. в моей базе
exports.getInfo = async function ()
{
configHeaders();
return await cachios.get(URL + '/user/info').then(data => {
return { success : true , data : data.data.data.user };
}).catch(err => {
return { success : false , message : err.response.data.message };
});
}