Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

axios pass params

const axios = require('axios');

// Equivalent to `axios.get('https://httpbin.org/get?answer=42')`
const res = await axios.get('https://httpbin.org/get', { params: { answer: 42 } });

res.data.args; // { answer: 42 }
Source by masteringjs.io #
 
PREVIOUS NEXT
Tagged: #axios #pass #params
ADD COMMENT
Topic
Name
2+7 =