Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

define default no cache axios headers

axios.defaults.headers = {
  'Cache-Control': 'no-cache',
  'Pragma': 'no-cache',
  'Expires': '0',
};

(async () => {
  const {
    data
  } = await axios.get('https://catfact.ninja/fact')
  console.log(data)
})()
Source by thewebdev.info #
 
PREVIOUS NEXT
Tagged: #define #default #cache #axios #headers
ADD COMMENT
Topic
Name
5+3 =