How can I get the data in a [[]}? – Javascript
The problem I am getting is I need to get the ID from a API response. The information is in a weird format I have not worked with before so I don't know how I would get the ID data…
The problem I am getting is I need to get the ID from a API response. The information is in a weird format I have not worked with before so I don't know how I would get the ID data…
I'm pretty new to MERN and I wonder if it possible at all. If you have any experience please help :) Here my naive code: 1. Create axios client const api = axios.create({ method: 'GET', baseURL: 'https://api.someAPI.com', headers: { 'API_KEY':…
I made a hook called useAxios where I get my token from the state and then use it to create an instance of Axios: export const useAxios = () => { const { userData } = useUser(); const customAxios =…
Here is my code which is causing the problems. I have Axios and I don't know how to use it effectively. import axios from "axios"; const options = { headers: { 'content-type': 'application/json', ContentType: 'text/json; charset=utf-8', 'X-RapidAPI-Key': 'REACT_APP_KEY', 'X-RapidAPI-Host': 'rdrunnerxx-trackservice.p.rapidapi.com'…
So I'm first making a call to my API to get and store user information, but then I need to make a second call to the API to get secondary information based on the response data from the first call.…
hi there I have a problem with react js, I have an upload file and want to send this file by form data into backend , this is my code : for (let i = 0; i < selectedFiles.length; i++)…
I have setup for axios and react-query together for my food application . I want to implement refreshing token only once for more than 2 parallel request and retry all the pending failed request . I searched so many solutions…
Tried adding {withCredentials: true} but still unable to send cookie to backend return await axios.post(`${API_URL}/posts/category/${id}`, { withCredentials: true }) Cookie
When I try to run multiple simultaneous axios operations of getting data from different data sources using a loop, the data received gets mixed, and therefore corrupted. I tried creating a different axios instance for each data source, but even…
I want to get first response then second response and then third response in the console section but i can not achieve this. please help me to solve this problem. this is the outputI tried to solve my problem in…