Multiple headers only take the last one
まだ誰も着手していません。
評価
この 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 件 ·
-
Is it really correct that the Javascript version of the graph SDK doesn't offer typed requests? オープンstatus:waiting-for-triage
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
-
status:waiting-for-triage type:bug
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
microsoftgraph/msgraph-sdk-javascript#1999 · コメント 2 件 · リアクション 1 件 ·
-
status:waiting-for-triage type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
microsoftgraph/msgraph-sdk-javascript の issue をすべて見る
似ている issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
supermomonga/zcode-acp#24 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
growthbook/growthbook#7100 ·
-
triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100