deno icon indicating copy to clipboard operation
deno copied to clipboard

Use `reqwest_middleware` lib to allow adding HTTP middleware.

Open maxmcd opened this issue 2 months ago • 2 comments

Hi, I was curious if there was interest to replace the reqwest::Client use in the codebase with reqwest_client::ClientWithMiddleware too allow for adding things like tracing and other middleware analysis to Deno network requests. This is not from the position of an end user using Deno, I am using Deno as a Rust library. I'm looking to get better visibility into network requests and debugging of import requests.

I am already doing this work, but wanted to see if it could be upstreamed. So far it doesn't seem too invasive.

Thanks!

maxmcd avatar Apr 23 '24 21:04 maxmcd

Feel free to open a PR, though I must warn you that we've had internal discussions about moving away from reqwest. Not sure about the timeline though :)

bartlomieju avatar Apr 23 '24 22:04 bartlomieju

Thanks @bartlomieju, sounds good. Happy to work with whatever the successor is if reqwest is replaced.

I've opened a PR here: https://github.com/denoland/deno/pull/23539

maxmcd avatar Apr 24 '24 16:04 maxmcd