Questions tagged [fetch]

For questions about the JavaScript Fetch API, use the [fetch-api] tag instead. For the git subcommand, use [git-fetch]. The [fetch] tag is a general-purpose tag for the keyword used in many programming languages, which is usually part of an instruction to retrieve data.

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

References

9439 questions
221
votes
5 answers

What is the difference between JOIN and JOIN FETCH when using JPA and Hibernate

Please help me understand where to use a regular JOIN and where a JOIN FETCH. For example, if we have these two queries FROM Employee emp JOIN emp.department dep and FROM Employee emp JOIN FETCH emp.department dep Is there any difference between…
abbas
  • 4,704
  • 2
  • 31
  • 30
190
votes
8 answers

Retrieve data from a ReadableStream object?

How may I get information from a ReadableStream object? I am using the Fetch API and I don't see this to be clear from the documentation. The body is being returned as a ReadableStream and I would simply like to access a property within this…
noob
  • 3,414
  • 4
  • 15
  • 28
97
votes
2 answers

How do I POST with multipart form data using fetch?

I am fetching a URL like this: fetch(url, { mode: 'no-cors', method: method || null, headers: { 'Accept': 'application/json, application/xml, text/plain, text/html, *.*', 'Content-Type': 'multipart/form-data' }, body:…
varad
  • 5,407
  • 14
  • 45
  • 95
93
votes
8 answers

How can I download a file using window.fetch?

If I want to download a file, what should I do in the then block below? function downloadFile(token, fileId) { let url = `https://www.googleapis.com/drive/v2/files/${fileId}?alt=media`; return fetch(url, { method: 'GET', headers: { …
zachguo
  • 4,332
  • 4
  • 26
  • 29
92
votes
3 answers

query specified join fetching, but the owner of the fetched association was not present in the select list

I'm selecting two id columns but get error specified: org.hibernate.QueryException: **query specified join fetching, but the owner of the fetched association was not present in the select list** [FromElement{explicit,not a collection join,fetch…
Vyacheslav
  • 2,727
  • 4
  • 24
  • 41
74
votes
1 answer

Fetch vs FetchMany in NHibernate Linq provider

NHibernate eager loading can be done using Fetch and FetchMany, as described in NHibernate Linq Eager Fetching on Mike Hadlow's blog. What is the difference between these two methods and under what circumstance would each be used?
Simon
  • 1,479
  • 3
  • 17
  • 23
74
votes
7 answers

PDO::fetchAll vs. PDO::fetch in a loop

Just a quick question. Is there any performance difference between using PDO::fetchAll() and PDO::fetch() in a loop (for large result sets)? I'm fetching into objects of a user-defined class, if that makes any difference. My initial uneducated…
Lotus Notes
  • 6,028
  • 7
  • 30
  • 47
60
votes
7 answers

Javascript: Fetch DELETE and PUT requests

I have gotten outside of GET and POST methods with Fetch. But I couldn't find any good DELETE and PUT example. So, I ask you for it. Could you give a good example of DELETE and PUT methods with fetch. And explain it a little bit.
Kirill Stas
  • 929
  • 3
  • 9
  • 14
60
votes
6 answers

fetch - Missing boundary in multipart/form-data POST

thanks for stopping by. I want to send a new FormData() as the body of a POST request using the fetch api the operation looks something like this var formData = new FormData() formData.append('myfile', file,…
James
  • 3,139
  • 2
  • 17
  • 22
56
votes
6 answers

Spring Data JPA And NamedEntityGraphs

currently I am wrestling with being able to fetch only the data I need. The findAll() method needs to fetch data dependant on where its getting called. I do not want to end up writing different methods for each entity graph. Also, I would avoid…
dendimiiii
  • 1,509
  • 2
  • 12
  • 24
54
votes
9 answers

React useEffect causing: Can't perform a React state update on an unmounted component

When fetching data I'm getting: Can't perform a React state update on an unmounted component. The app still works, but react is suggesting I might be causing a memory leak. This is a no-op, but it indicates a memory leak in your application. To…
Ryan Sam
  • 1,267
  • 3
  • 8
  • 20
52
votes
13 answers

php pdo: get the columns name of a table

How can I get all the column names from a table using PDO? id name age 1 Alan 35 2 Alex 52 3 Amy 15 The info that I want to get are, id name age EDIT: Here is my…
laukok
  • 47,545
  • 146
  • 388
  • 689
50
votes
2 answers

Using Axios GET with Authorization Header in React-Native App

I'm trying to use axios for a GET request with an API which requires an Authorization header. My current code: const AuthStr = 'Bearer ' + USER_TOKEN; where USER_TOKEN is the access token needed. This string concatenation may be the issue as if I…
Ally Haire
  • 1,563
  • 1
  • 11
  • 18
48
votes
6 answers

Hibernate fetching strategy - when to use "join" and when to use "select"?

Most Hibernate associations support "fetch" parameter: fetch="join|select" with "select" being default value. How to decide which one to use for which association? I tried changing all from "select" to "join" application wide - number of generated…
serg
  • 103,023
  • 70
  • 299
  • 324
46
votes
7 answers

GET with query string with Fetch in React Native

I am making a request like this: fetch("https://api.parse.com/1/users", { method: "GET", headers: headers, body: body }) How do I pass query string parameters? Do I simply add them to the URL? I couldn't find an example in the docs.
Guy
  • 9,859
  • 13
  • 63
  • 104
1
2 3
99 100