Avoid stale headers by supplying them as a function
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- api
调研方向
从库的 fetch() 入口点开始,跟踪 headers 选项如何存储以及如何在重试期间复用。验证现有的重试流程,然后将 done 定义为允许在每次调用 fetch() 时重新计算 headers,包括刷新的身份验证值。
由索引模型根据 Issue 内容生成。
描述
One of the most common usages for headers is authentication. However, if one provides a token as part of a header to this library, its value will remain the same forever, even through retries and whatnot. If at a given moment the token expires and needs to be refreshed, there will be no hope in reconnecting, so the retry mechanism becomes quite pointless.
I propose to allow passing "headers" in as a function, in which case it will be called every time fetch() is, in order to recompute the potential dynamic values in them.
- 主要语言
- TypeScript
- 星标
- 2.9k
- 派生
- 197
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/fetch-event-source 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 28/100
Azure/fetch-event-source#102 ·
-
难度 3/5 1-2 天 新手友好度 25/100
Azure/fetch-event-source#101 · 3 条评论 ·
-
When aborting the event source using abort controller, no callbacks (onError / onClose) are fired未关闭
难度 3/5 1-2 天 新手友好度 48/100
Azure/fetch-event-source#100 · 1 条评论 · 5 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
Azure/fetch-event-source#99 ·
-
难度 3/5 1-2 天 新手友好度 35/100
Azure/fetch-event-source#98 · 9 个 reaction ·
查看 Azure/fetch-event-source 的全部 Issue
相似的 Issue
-
area:editor bug issue-form:bug P0 platform:windows review: low
难度 2/5 1-3 小时 新手友好度 64/100
1lck/Lithe-IDEA#1388 ·
维护者通常 1 天内回复
-
fix(api): isToolAuditEnabled swallows database read errors on auditToolOperations without logging未关闭area: backend bug priority: low
难度 2/5 1-3 小时 新手友好度 82/100
snapotter-hq/SnapOtter#3238 ·
维护者通常 1 天内回复
-
rig up --plan times out after 5 s and reports an UNKNOWN outcome while the daemon completes the plan未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
modelcontextprotocol/servers#5216 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复