The Wayback Machine - https://web.archive.org/web/20210827192957/https://github.com/topics/fetch
Skip to content
#

fetch

Here are 1,843 public repositories matching this topic...

swr
Daiz
Daiz commented Nov 27, 2019

The documentation for mutate talks about local mutation for faster feedback, but the documented way to use it only mutates after a promise has resolved - in other words, not immediately.

As a result, I've found myself writing code in this kind of pattern:

mutate(path, { ...data, patch }, false); // mutate immediately, don't revalidate
await patchData(patch); // await the 
node-fetch
brighttank
brighttank commented Aug 9, 2021

For some reason Amazon REST api's require the content-type to be set to "application/x-amz-json-1.1" instead of the standard "application/json"

Currently the content-type header is set automatically for json data overriding any headers passed in to the request.

It would be useful to first check if the header is set before overriding it:

if (!this.request.headers.set('content-type')) {

Improve this page

Add a description, image, and links to the fetch topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the fetch topic, visit your repo's landing page and select "manage topics."

Learn more