Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

pass params axios get react

const params = new URLSearchParams([['answer', 42]]);

const res = await axios.get('https://httpbin.org/get', { params });
res.data.args; // { answer: 42 }
Source by masteringjs.io #
 
PREVIOUS NEXT
Tagged: #pass #params #axios #react
ADD COMMENT
Topic
Name
5+9 =