[WIP] Convert global fetcher to use http crate#480
Closed
kflansburg wants to merge 1 commit intomainfrom
Closed
Conversation
kflansburg
commented
Mar 15, 2024
| mod test; | ||
| mod utils; | ||
|
|
||
| #[cfg(feature = "http")] |
Contributor
Author
There was a problem hiding this comment.
These just convert the types between what fetch expects (depends on feature flag) and what the test harness router expects (worker::Request). I think pretty soon we should have the http version of the test harness use axum and remove this.
Contributor
There was a problem hiding this comment.
If the only reason you see for that API is to be used by the tests as is, then I think, they should be dropped.
Regarding tests, I believe we should move to wasm-bindgen-test and move unit tests closer to the source.
As MrBBot no longer told me to wait, so I started getting my feet wet...
wasm-bindgen/wasm-bindgen#3891
That would allow tests to be direct, instead of the current model.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This was identified as an inconsistency in the original PR (#477). This is one option for fixing it (converting the existing API), but another that I will try is to improve interoperability so that we can just recommend that people use
reqwestdirectly and remove this API entirely. Will open another PR with that option.Note that there is one breaking change: the request object supplied to
fetch_with_requestis no longer a reference.