I am working on building a website and wish to expand my API functionality. I have a frontend react app and a backend express nodejs server.
I have another local webserver that hosts some data about football matches. Data about the round and year is served by calling /nrl/week={week}&season={year}.
The react app is currently set up such that axios sends a request to the backend and the backend sends a request to the other webserver.
const data = await axios.get('/nrl') frontend code
request('http://127.0.0.1:5000/nrl/week=20&season=2022', backend code
I want to be able to make a request from the front end to the backend specifying what week and season, as currently its hardcoded.
Thanks
requestis deprecated and has been for some time. I would recommend Axios or got?