Search
 
SCRIPT & CODE EXAMPLE
 

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)
})()
Comment

PREVIOUS NEXT
Code Example
Javascript :: iterate formData 
Javascript :: eof while parsing 
Javascript :: random id number nodejs 
Javascript :: get element by class 
Javascript :: remove the items in array which are present in another javascript 
Javascript :: what can i delete from create-react-app 
Javascript :: toggle attribute jquery 
Javascript :: eslint unexpected console statement 
Javascript :: javascript move last array element to first 
Javascript :: lodash get difference between two arrays of objects 
Javascript :: for in object javascript 
Javascript :: js get element type 
Javascript :: how to create infinite loop in javascript 
Javascript :: async storage has been extracted from react-native core 
Javascript :: javascript html encode 
Javascript :: prime or not in javascript 
Javascript :: how to divide equal 3 parts of an array javascript 
Javascript :: jquery modal if clicked outside 
Javascript :: js code to take value from form and store it in a variable 
Javascript :: how to convert array to object in lodash 
Javascript :: convert milliseconds to minutes and seconds javascript 
Javascript :: mongoose unique field 
Javascript :: convert object to boolean javascript 
Javascript :: get ip of user in node js 
Javascript :: curl post json file 
Javascript :: react native zindex issue on android 
Javascript :: update angular materia; 
Javascript :: exec js 
Javascript :: javascript rtsp player 
Javascript :: factorial of number js 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =