Multiple headers only take the last one
还没有人认领这个 Issue。
评估
这个 Issue 还没有评估数据。
描述
Bug Report
Prerequisites
- Can you reproduce the problem?
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you perform a cursory search?
For more information, see the CONTRIBUTING guide.
Description
Using the client's .header() method multiple times will only send the last header if several of them with the same name.
Console Errors:
No
Screenshots: [If applicable, add screenshots to help explain your problem]
Steps to Reproduce
const client = Client.init({...});
const response = await client
.api(`/users/${upn}/mailFolders/Inbox/messages`)
.header('Prefer', 'outlook.body-content-type="html"')
.header('Prefer', 'IdType="ImmutableId"')
.get();
console.log(response);
Expected behavior:
- Message body in HTML format
- Immutable IDs
Actual behavior:
- Message body in text format (default if unspecified)
- Immutable IDs
Flipping the order of the method calls will return messages in HTML format but not with immutable IDs.
Additional Context
The method only takes a string so two values cannot be passed. For example this is not permitted:
.header('Prefer', ['outlook.body-content-type="html"', 'IdType="ImmutableId"'])
Usage Information
Request ID - Value of the requestId field if you are receiving a Graph API error response
SDK Version - 3.0.4
- Node (Check, if using Node version of SDK)
Node Version - v18.12
- Browser (Check, if using Browser version of SDK)
Browser Name - [The name of Browser that you are using for SDK]
Version - [The version of the browser you are using]
- 主要语言
- TypeScript
- 星标
- 833
- 派生
- 240
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoftgraph/msgraph-sdk-javascript 的其他 Issue
-
status:waiting-for-triage
难度 1/5 1 小时以内 新手友好度 62/100
-
Is anyone here? 未关闭
难度 4/5 3-5 天 新手友好度 25/100
microsoftgraph/msgraph-sdk-javascript#2005 · 1 个 reaction ·
-
status:waiting-for-triage
难度 5/5 一周以上 新手友好度 42/100
-
status:waiting-for-triage type:bug
难度 3/5 1-2 天 新手友好度 48/100
microsoftgraph/msgraph-sdk-javascript#1999 · 2 条评论 · 1 个 reaction ·
-
status:waiting-for-triage type:bug
难度 4/5 3-5 天 新手友好度 45/100
查看 microsoftgraph/msgraph-sdk-javascript 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 75/100
fil-donadoni/tolaria#4409 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
corsairdev/corsair#1764 ·