Questions tagged [fetch]

DO NOT USE. For questions about the JavaScript Fetch API, use the [fetch-api] tag instead. For the git subcommand, use [git-fetch]. This tag is ambiguous.

fetch is used in many contexts, include source control, database querying, and cache control.

References

11193 questions
2
votes
1 answer

How can I acces the values of my async fetch function?

I want to use my fetched values in another function I'm really new to JS. So until now I tried this.setState() and a return value of the function . async fetchData() { const url = 'http://localhost:8080'; const response = await…
KurgerBing
  • 173
  • 1
  • 2
  • 16
2
votes
0 answers

Problem with accents while "fetching" some data

I'm with a problem with accented words on a 'fetch'... I've tried so many things but nothing changed. Do you folks know how make this out? The problem is, the accented words come in this value.label variable. I've tried putting the charset on the…
2
votes
1 answer

Fetch and group JSON data for FlatList in React-Native

Here is my Original Json. I'm using fetch and Flatlist for getting and showing json data. My codes works correctly but I want to seperate json by "gender" looks like in below. I researched groupby and reduce functions but i couldn't find…
mehmetdemiray
  • 976
  • 4
  • 13
  • 32
2
votes
1 answer

Browser cannot read and send cookies with fetch api even set credentials to include on cross origin request

Fetching cross origin request, Chrome cannot read set-cookie even if I set the credentials: 'include' and the server gives: Access-Control-Allow-Credentials: true Access-Control-Allow-Origin: http://127.0.0.1:3000 It's a react(^16.6.3) project…
2
votes
1 answer

Javascript not catching error using fetch

I have an authService which has the following fetch export const handleForm = () => { return fetch('http://localhost:5000/login') .then(response => { if (!response.ok) { throw new Error("Email or password…
Miguel Stevens
  • 8,631
  • 18
  • 66
  • 125
2
votes
3 answers

Spring Auth + JWT login response 200 but body and headers missing

I am having a bit of a tough time with Spring Security. Basically I have /auth/signup and /auth/login for account creation and obtaining jwt token, respectively. Both work perfectly locally via Insomnia/POSTman but when making the request to…
Colin Riddell
  • 407
  • 4
  • 17
2
votes
0 answers

Access-Control-Allow-Origin error when posting to Jira Cloud API

I am using the standard cloud API for Jira and having troubles using their API to create an issue. I have tried both basic and token auth, both with the same CORS error. I have followed the steps listed in these documents (here and here) and can…
Charklewis
  • 4,427
  • 4
  • 31
  • 69
2
votes
2 answers

TypeError: userData.map is not a function even though userData is an array

I am quite new to react and trying to fetch data from a .json file (called userData.json), but .map is not working even though userData is an array. I already checked this by doing console.log(Array.isArray(userData)); console.log(typeof…
Nikolas Ch
  • 31
  • 1
  • 4
2
votes
0 answers

Sending audio using Fetch API - React Native

I am trying to record an audio file and send it using fetch. Below is the code that I am using to record but I don't know how to send the file over. The file is being recorded using a browser, so react-native-web. /* eslint-env browser */ import…
2
votes
1 answer

Swift 4 Core Data - Fetching Relationships

I have entities as so: Entity 1 Entity 2 I am saving data as so: @IBAction func saveButton(_ sender: UIButton) { print("save") guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return } let context…
Nathaniel
  • 70
  • 1
  • 10
2
votes
1 answer

Github API punch card data transformation

I want to create a graph that displays the information provided by the Github PunchCard in a similar way as this python script, but with JavaScript instead, using D3.js. I retrieve the information from the Github API this way using GET…
Marta Lobo
  • 175
  • 1
  • 16
2
votes
2 answers

Tabulator ajax request and CORS

I'm having trouble disabling CORS for a tabulator ajax request. Have tried to use values from fetch configuration passed in ajaxConfig but to no avail. If I take out ajaxConfig I get hit with CORS but If I send the ajaxConfig stuff I get an error:…
2
votes
1 answer

How to send values like form-data postman - react js

I'm using fetch to send value to my server. my server is php. when I send my values with postman my server response as well. but when I want to send my values with fetch I cannot get them from server side. postman: my requestOption: const…
S.M_Emamian
  • 17,005
  • 37
  • 135
  • 254
2
votes
6 answers

Need help with mysql_fetch_array() error?

When i try to run this code i get the error: "Warning: mysql_fetch_array() expects parameter 1 to be resource, string given" i've been trying to debug it but i cant seem to. it's connecting to a table with 6 fields: id (int) | name (varchar) | image…
Rahulpwns
  • 23
  • 2
2
votes
0 answers

problem with cookies and login/logout with axios

I need to login from the browser using an axios request. the problem is that the cookies are not being set somehow. since I am making a call from a javascript file, the path that shows up in the browser is something like…
faraz
  • 2,603
  • 12
  • 39
  • 61
1 2 3
99
100