Category "fetch"

Continuously Fetch API For new data React Fetch

I've a dynamic json that changes value continuously. i want to draw chart with that data so i stored the dynamic data to array then draws chart with that array.

How to change port using fetch and request react js?

This is the code I took from my professor's tutorial. LoginComp is just {username: '', password: ''} const request = new Request("/users/login", { method: "

How do I handle res.download(pathname) on frontend(ReactJS)

I have written a code on my server(NodeJS) that will send a .csv file to the frontend with express res.download(path). I would like to know how I can handle the

How to ressolve TypeError: Network Request Failed for react project running at android device

While running my react native app on android device using expo the api response are not coming which is done using fetch and POST method and getting this error:

Using A fetch() GET Request After A fetch() POST Request Has Been Submitted To Output Database Data Without A Hard Page Refresh

I have a form that submits data with the javascript fetch() API to MySQL database with PHP. In the code below, when the form is submitted a success message is o

Javascript running locally but not on heroku node js

I have code which pulls a list of urls from a JSON file and then displays them. It is a node.js app. It works locally but then when I push to heroku it doesn't

Problem with FastAPI patch request from Javascript

I made a REST service on python using FastAPI and I need to call the API using Javascript. This is my FastAPI server: class FieldUpdate(BaseModel): item_id: Opt

Can log updated value but cant render it with mobx flow

I am trying to make a really simple api call without any logic at all.Althoough I get an illegible object in the consoel called 'proxy' at leaset (not expected

Why doesn't fetch work in store's nuxtServerInit?

For my project I'm using Nuxt. In the store's action I have this piece of code: async nuxtServerInit({ commit }) { this.dispatch('fetchAllClients') }, async f

Azure function accessible locally only

I have an Azure static web app with a svelte front end and azure server less functions for backend. When developing locally I can connect to the functions perfe

ReactJS API call - Need redirect URL in response from request with 30X status without redirecting

I have an API which returns 30X response and redirects to a specific URL. But, I want to get redirect URL from response without redirection. I am using this in

UrlFetchApp fetch how to retrieve JSESSIONID object for the cookies?

I'm trying to use UrlfetchApp to send a request to a page. Request is good. But returning <p>Your browser is currently set to block cookies. Please enable

React Native android FormData response goes to catch block after .json()

I'm trying to POST data with FormData to get a response, on iOS it works as expected, but on android, it always goes to the catch block, I found out the reason

Display GET Request data in HTML

This endpoint http://vk-data:8003/v1/entries/ returns this: [ { "id": "country", "url": "http://vk-data:8003/v1/entries/country", "n

Credentials: 'include' not including Cookie header

I'm using credentials: 'include' and mode: 'cors' on the client. On the server I see access-control-allow-credentials: true and access-control-allow-origin: htt

Discord.JS fetchMessage()

I have a problem with my Discord.JS Bot, I wanna to edit a embed in a spefic guild and channel, but when I try to run the commands, it errors out with this /roo

Query and get data from an endpoint through the a search bar input in javascript

This endpoint http://vk-data:8003/v1/entity/ returns this: [ { "id": "country", "url": "http://vk-data:8003/v1/entity/country", "nam

Async/Await in fetch() how to handle errors

I have stripe async code in my React app, and trying to add error handling in my code but have no idea how to handle it. i know how to do it with .then() but as

Next.js: Reduce data fetching and share data between pages

I'm looking for solutions for better data fetching in a Next.js app. In this question I'm not just looking for a solution, I'm looking for multiple options so w

Cors issues with JWT Authentication for WP REST API and local React project

I succesfully installed "JWT Authentication for WP REST API" and followed (and reviewed multiple times) the instructions for setup correctly. My React app does