using functions with axios get one params code example
Example 1: how to send data in query param in axios in get request
const res = await axios.get('https://httpbin.org/get', { params: { answer: 42 } });
Example 2: how to send search term with axios get
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 }