I am trying to make an API call in useEffect() and want useEffect() to be called everytime a new data is added in the backend. I made a custom Button(AddUserButton.js) which adds a new user in backend. I am importing this button in the file (ManageUsers.js) where I am trying to display all the users. I just wanted to make
Tag: fetch
How to correctly use Fetch in JavaScript and Django?
I am trying to make a METAR decoder as shown: I am using fetch in Vanilla js and I plan to send the entered code to a Django view. From the Django view, the decoded data will be taken and displayed in the template. views.py urls.py tools.html tool.js I have used the same code for POST using fetch where I
how to map through multiple images, after connecting to a third party api
I’ve managed to connect to an api, which returns images of dogs. However, I’m stuck on how to map more than one image, without repeating code. I essentially want to display a grid with(lets say 9) images, all with different dog images from this api. At the moment, it displays one image with a json object mapped out underneath it.
can’t fetch msgraph data using vanilla js
I am trying to pull data from the endpoint https://graph.microsoft.com/v1.0/me/. I have done this using python but I can’t seem to fetch data from Microsoft Graph using vanilla js. When I attempt to perform a fetch request. I get a 200 response but nothing is inside the response object. Here is the fetch code: I get a response of: but
Express GET request not reloading page
I’m trying to send the client the next HTML page (create.html) as a response to a GET request (fired by button) using fetch. I am purposely trying to avoid using a form due to formatting issues and potential future scaling issues. The code registers that the request is sent, received, and is responded to with the file but it simply
Res.send not a function
I have an endpoint (using express) which requires me to do some fetching first. Once a parse the response and use res.send I get an error res.send is not a function. I tried searching for this error but all searches show users had res,req in the wrong order. In this case, mine appear to be right. Why is it res
Global memoizing fetch() to prevent multiple of the same request
I have an SPA and for technical reasons I have different elements potentially firing the same fetch() call pretty much at the same time.[1] Rather than going insane trying to prevent multiple unrelated elements to orchestrate loading of elements, I am thinking about creating a gloabalFetch() call where: the init argument is serialised (along with the resource parameter) and used
TypeError: Cannot Read function of ‘fetch’ of undefined (discord.js)
Ok so basically its showing me an Error that property of fetch dosent exist i am using the replit database for a balance command (discord.js) Error Image Here is the command file: So how do I fix the error Thanks In advance Answer Well client.db does not exist, this is what your error message is telling you. I am suggesting
Unable to pass value from input to fromData in reactjs
I am having a form using react-hook-form and I am updating the input forms using setState but when I am get formData and do a fetch request the value from the input text field is not loading at all. This is the picture when I update the input text field from setState and do a fetch request This is the
How can I get returned string values in fetch()
Below code is my fetch method in my separate register.js. This is my newly created js file, so I can create my front end. At the moment I’m just trying to console.log the ending result for this fetch, but can’t get the output since I’m getting an error when I try to POST this. error in browser console: “Uncaught (in