pass params axios get react

Solutions on MaxInterview for pass params axios get react by the best coders in the world

showing results for - "pass params axios get react"
Jonathan
15 Jan 2017
1const params = new URLSearchParams([['answer', 42]]);
2
3const res = await axios.get('https://httpbin.org/get', { params });
4res.data.args; // { answer: 42 }