This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: limit concurrent HTTP requests in browser #2304
fix: limit concurrent HTTP requests in browser #2304
Changes from 18 commits
5c5f891
45465ff
7e422e9
7171981
6c404ea
3ea284d
d5fd304
a6d09c1
1999de7
c4d0a83
a074cbb
4af8560
b5038ec
857769a
79ae97f
0f6b543
e29e42b
c239abd
e7534ff
62dbdc3
e49143e
af208c3
ad65329
11ab304
ddd49ce
2e82b2a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One day we will use something like https://github.com/ipfs/js-ipfs-http-client/blob/master/src/lib/stream-to-iterable.js to stream the response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That day is today. Well, yesterday. Since we merged #2379 you should be able to pass iterables to
ipfs.add
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@achingbrain seems that
ky
does not expose ReadableStream yet:sindresorhus/ky#3 (comment)
To avoid blocking this PR, I'd keep this as-is and add streaming in separate PR, after support in
ky
lands.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only cache when
response.ok
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't: negative DNSLink result is returned as HTTP 500:
https://ipfs.io/api/v0/dns/arg=google.com
and we want to cache negatives too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be promise-first please? E.g. make this an async method but export a nodeified version. This will make future refactors to remove callbacks easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its already done? the async method is inside:
when we refactor to remove callbacks we just remove the wrapper.
Let me know if this should be handled some other way.
This file was deleted.
This file was deleted.