I have nextjs frontend that fetch data from strapi backend. Problem is that data is empty even if i can see on strapi dev logs that request has been made. This is next.js code And here is the strapi log But I don’t know why is data empty. Truth is that the response consist of base64 long text but I
Tag: fetch
It doesn’t print the names on screen with fetch call
I have to call the data from the given URL with fetch call. It should print the name of academy in and student names in on screen but when I click the button nothing happens. I know maybe its a huge code and it takes time but I would be grateful if someone could help me. Thank you in advance.
(Bug) fetched object from server returns undefined
There is a lot of code involved in this process, so I will explain the best way possible to narrow down the problem. First, the user signs up and sends an object with other nested objects and arrays to the middleware. The middleware… the console gets logged “passData returned: [object Object]” this then gets processed into a “block” to be
Node express API not get in response?
I have created a node-express API. And I request using fetch like this In Network tab I got the same JSON object send from server. In console log of resonpse it print below things…. How can I use the JSON data that send from the server? Answer To get the actual data, you need response.json() like this to actually read
how to get data use fetch API correctly in vue js?
I’m trying to fetch data from the backend using the GET method, but I always fail to get the data. I get the following error: CORS header ‘Access-Control-Allow-Origin’ missing. I don’t know how it happens because I tried to use POST method to my backend it worked. Here’s a capture of my browser tools When I use fetch to get
Setting localStorage using fetch
I am creating a weather dashboard and am trying to save the city name to local storage. I already have the logic written to have the city post in the history section I just can’t get the data to stay there after I reload the page. I have checked and it is saving to local storage but just not retrieving
How can you change the index of multiple array objects?
Problem: How can you change the index of multiple objects within an array of 100 objects? In my case I would like to push them to the end of the array. I have fetched a json array that contains over 100 objects, each with their own properties including a number property for each object that can be used to filter.
Difference when comparing the timing results of performance API and chrome’s developer tools
I am trying to time a fetch call. The following screenshot shows the time chrome developer tools show for a particular fetch request. As could be seen for the request marked in red color, total time it took was 79 milliseconds. Looks good. When I try to time using the performance api, the milliseconds are more than 100% at 163.46000001067296
Why then doesn’t keep the order of the callbacks?
I have the following code: I thought that the output should be first ‘123’ and then ‘should wait’. From unclear reason the ‘should wait’ is printed first. I thought that the second then won’t start until the asynchrony function (setTimeout) won’t finished. I read that this is all the “magic” of using Promise and then. Now i’m very confused. Why
how to reverse fetch images from nasa APOD api in react
** I fetched content from API with this code** and output of this code is like this and I want Button here with next and then that will show previous day images so can anyone tell me how to reverse that means after clicking on the next button by reversing the previous day images will show because NASA APOD(astronomy picture