This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jacobheun
approved these changes
Apr 10, 2020
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.
Verified against libp2p delegated routing apis. Options are being properly passed into the url params.
Refactors how we pass url params to the API, all args are now normalised in one place. If a timeout is passed it is passed on to the server as a url search param. N.b. this does mean that timeouts are set in the client and on the server so it's not always clear which will expire first, though one will expire. We do our best to ensure the errors are the same, though when the API is streaming there's no way to tell if the request completed successfully or if the timeout occured as the timeout message arrives in http trailers.
achingbrain
force-pushed
the
fix/honour-server-timeout
branch
from
April 14, 2020 15:52
ab6b976
to
524722a
Compare
SgtPooki
referenced
this pull request
in ipfs/js-kubo-rpc-client
Aug 18, 2022
Refactors how we pass url params to the API, all args are now normalised in one place. If a timeout is passed it is passed on to the server as a url search param. N.b. this does mean that timeouts are set in the client and on the server so it's not always clear which will expire first, though one will expire. We do our best to ensure the errors are the same, though when the API is streaming there's no way to tell if the request completed successfully or if the timeout occurred as the timeout message arrives in http trailers.
This was referenced Jan 7, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Refactors how we pass url params to the API, all args are now normalised in one place. If a timeout is passed it is passed on to the server as a url search param.
N.b. this does mean that timeouts are set in the client and on the server so it's not always clear which will expire first, though one will expire.
We do our best to ensure the errors are the same, though when the API is streaming there's no way to tell if the request completed successfully or if the timeout occurred as the timeout message arrives in http trailers.
Also fixes a problem we have, where the README says we support passing
searchParams
as an additional option:yet this ends up getting sent as: