-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
node-modules/urllib
#382Description
背景
undici 已经被大规模使用,当初做 urllib 是 node 的基础 http 库太弱,现在 node 官方在支持 undici 快速迭代,并且性能非常好,没理由不去升级的。
思路
- 基于 undici 做一个 egg httpclient 实现,api 遵循 undici 的开发者习惯。
- 基于这个 undici 实现的 httpclient 封装一个兼容 urllib 接口的过渡性 httpclient,在当前 egg 版本通过配置可以选择是 urllib 还是 undici 作为基础 http 库,默认是 urllib。在下一个 egg 大版本默认改成 undici,下下个 egg 大版本将 urllib 设置为 deprecated,只保留安全更新不再新增新功能。
跟进
- 基于 undici 做一个 egg httpclient 实现 📦 NEW: [BREAKING] Refactor impl base on undici node-modules/urllib#382
- 基于这个 undici 实现的 httpclient 封装一个兼容 urllib 接口的过渡性 httpclient 📦 NEW: [BREAKING] Refactor impl base on undici node-modules/urllib#382
-
文档默认推荐 fetch 接口,支持 httpclient 一样的 tracing 能力 - 默认还是 urllib request 接口,通过 https://github.com/nodejs/undici/blob/main/docs/api/DiagnosticsChannel.md 实现 tracing
atian25
Metadata
Metadata
Assignees
Type
Projects
Status
Done