45 Matching Annotations
- Aug 2023
-
stackoverflow.com stackoverflow.com
-
It does, however, lack certain features (such as progress monitoring) that XMLHttpRequest provides.
-
- Jul 2023
-
developer.mozilla.org developer.mozilla.org
- Jun 2023
- Mar 2023
-
rolandjitsu.github.io rolandjitsu.github.io
- Jul 2022
-
developer.chrome.com developer.chrome.com
-
wicg.github.io wicg.github.io
Tags
Annotators
URL
-
- Mar 2022
-
tvrctkmytfln.gitee.io tvrctkmytfln.gitee.io
-
Programs that repeatedly reference the same variables enjoy good temporallocality..For programs with stride-k reference patterns, the smaller the stride, thebetter the spatial locality. Programs with stride-1 reference patterns have goodspatial locality. Programs that hop around memory with large strides havepoor spatial locality..Loops have good temporal and spatial locality with respect to instructionfetches. The smaller the loop body and the greater the number of loop it-erations, the better the locality.
locality 总结起来的特点是什么?
-
- Jan 2022
-
-
No need to debounce fetch (terrible UX), just fire them away
-
- Oct 2021
-
-
const fetchWithJSONHeaders = applyDefaults(fetch, { headers: { "Content-Type": "application/json" } }); const fetchWithTextHeaders = applyDefaults(fetch, { headers: { "Content-Type": "application/text" } }); // Fetch JSON content const response = await fetchWithJSONHeaders("/users", { method: "GET" });
-
-
github.com github.com
-
while with server/externalFetch there is no direct way to pass cookie headers from the original request to the external one
-
Right now I am working around this issue by having an internal [...api].js, then call fetch for that endpoint (which automatically passes on cookies) and from there hit the actual external endpoint. It works, there is no risk of leaking anything, but imo shouldn't be necessary.
-
Sure you can abuse session but I don't like that since there is the risk of exposing credentials to client side code.
-
-
kit.svelte.dev kit.svelte.dev
-
This function allows you to modify (or replace) a fetch request for an external resource that happens inside a load function that runs on the server (or during pre-rendering). For example, your load function might make a request to a public URL like https://api.yourapp.com when the user performs a client-side navigation to the respective page, but during SSR it might make sense to hit the API directly (bypassing whatever proxies and load balancers sit between it and the public internet).
-
- Jul 2021
-
blog.arduino.cc blog.arduino.cc
- Jun 2021
-
github.com github.com
-
Unlike browsers, you can access raw Set-Cookie headers manually using Headers.raw(). This is a node-fetch only API.
-
-
developer.mozilla.org developer.mozilla.org
-
developers.google.com developers.google.com
-
kit.svelte.dev kit.svelte.dev
-
When fetch runs on the server, the resulting response will be serialized and inlined into the rendered HTML. This allows the subsequent client-side load to access identical data immediately without an additional network request.
-
-
github.com github.com
-
I don't know how much workaround is it, but for now I'm using this approach:
Looks like a catch-all
api/[...route]
internal endpoint that proxies to the real external API server.
-
-
-
would be different depending on whether the fetch is internal or external
-
-
github.com github.com
-
export function get(req, res) { if (req.headers.authorization) { res.writeHead(200); res.end(JSON.stringify({ message: req.headers.authorization })); } else { res.writeHead(200); res.end(JSON.stringify({ message: 'unauthorized' })); } }
-
- May 2021
-
-
We implemented isomorphic fetching (i.e. fetching with the browser's implementation on the client and node-fetch on the server)
-
-
github.com github.com
-
fetch: (url: string, opts?: any)
-
-
github.com github.com
-
if (parsed.protocol) { // external fetch response = await fetch(parsed.href, /** @type {import('node-fetch').RequestInit} */ (opts)); } else { // otherwise we're dealing with an internal fetch const resolved = resolve(request.path, parsed.pathname);
-
-
github.com github.com
-
import '@sveltejs/kit/install-fetch';
-
- Mar 2021
-
impedagogy.com impedagogy.com
-
the Hypothes.is extension called “Fetch”:
Browser extension for fetching and formatting Hypothes.is annotations into markdown bullet points, ready for copying into Roam, Notion or similar apps.
Here are our annotations so far fetched by Fetch:
Muse Matters
Source: https://impedagogy.com/wp/blog/2021/03/19/muse-matters/
- ^^Please respond in any way you wish to the blog post. I will take our responses and share them in another blog post as well as use the responses for remix, sharing, and other creative uses. Please tag your responses if it seems appropriate.^^
- Muse
- ^^Reminded of Chapter 11 in The Odyssey: I am likely going to retire this year and I find resonance in this as it appears that I will be accepting a "voluntary" buyout at the end of this fiscal year. My long sea journey, 25 years worth in teaching, will be officially over. Hence...the appeal to propitiate the gods, to let all the pain go, to ask forgiveness of the implacable Poseidon. ^^
- then convert that
- "then have them convert that"
- describe how you might go about creating a poem, short story, or play from the blog post.
- ^^I am always a little surprised by how few students choose this option. I should ask them. ^^
- ^^Please respond in any way you wish to the blog post. I will take our responses and share them in another blog post as well as use the responses for remix, sharing, and other creative uses. Please tag your responses if it seems appropriate.^^
Tags
Annotators
URL
-
- Nov 2020
-
stackoverflow.com stackoverflow.com
-
I have created a thin wrapper around fetch() with many improvements if you are using a purely json REST API:
-
-
- Sep 2020
-
www.sitepoint.com www.sitepoint.com
-
Cookieless by Default Unlike XMLHttpRequest, not all implementations of Fetch will send cookies so your application’s authentication could fail.
-
- Apr 2020
-
javascript.info javascript.infoFetch1
-
he basic syntax is: let promise = fetch(url, [options])
Test question: What s the basic syntax of fetch(); ?
Tags
Annotators
URL
-
-
www.taniarascia.com www.taniarascia.com
-
Metadata::
- Author:: Tania Rascia
- Article:: How to Use the JavaScript Fetch API to Get JSON Data
- URL:: How to Use the JavaScript Fetch API to Get JSON Data – Tania Rascia
-
- Dec 2019
-
blog.logrocket.com blog.logrocket.com
-
By default, fetch() doesn’t provide a way to intercept requests, but it’s not hard to come up with a workaround. You can overwrite the global fetch method and define your own interceptor, like this
-
If your only reason for using Axios is backward compatibility, you don’t really need an HTTP library. Instead, you can use fetch() with a polyfill like this to implement similar functionality on web browsers that do not support fetch(). To begin using the fetch polyfill, install it via npm command: npm install whatwg-fetch --save
-
-
- Oct 2018
-
developer.mozilla.org developer.mozilla.org
-
developers.google.com developers.google.com
Tags
Annotators
URL
-
-
developer.mozilla.org developer.mozilla.org
-
developer.mozilla.org developer.mozilla.org
-
The ReadableStream interface of the Streams API represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
-
-
jakearchibald.com jakearchibald.com
Tags
Annotators
URL
-
- Sep 2018
-
hacks.mozilla.org hacks.mozilla.org
-
// Download a json but don't reveal who is downloading it fetch("sneaky.json", {referrerPolicy: "no-referrer"}) .then(function(response) { /* consume the response */ }); // Download a json but pretend another page is downloading it fetch("sneaky.json", {referrer: "https://example.site/fake.html"}) .then(function(response) { /* consume the response */ }); // You can only set same-origin referrers. fetch("sneaky.json", {referrer: "https://cross.origin/page.html"}) .catch(function(exc) { // exc.name == "TypeError" // exc.message == "Referrer URL https://cross.origin/page.html cannot be cross-origin to the entry settings object (https://example.site)." }); // Download a potentially cross-origin json and don't reveal // the full referrer URL across origins fetch(jsonURL, {referrerPolicy: "origin-when-cross-origin"}) .then(function(response) { /* consume the response */ }); // Download a potentially cross-origin json and reveal a // fake referrer URL on your own origin only. fetch(jsonURL, {referrer: "https://example.site/fake.html", referrerPolicy: "origin-when-cross-origin"}) .then(function(response) { /* consume the response */ });
-
-
fetch.spec.whatwg.org fetch.spec.whatwg.org
-
- Feb 2018