Answers for "pass params axios get react"

0

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 }
Posted by: Guest on July-31-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language