Multiple headers only take the last one
Nadie ha tomado este issue todavía.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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]
- Lenguaje dominante
- TypeScript
- Estrellas
- 833
- Forks
- 240
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoftgraph/msgraph-sdk-javascript
-
status:waiting-for-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
-
Is anyone here? Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
microsoftgraph/msgraph-sdk-javascript#2005 · 1 reacción ·
-
Is it really correct that the Javascript version of the graph SDK doesn't offer typed requests? Abiertostatus:waiting-for-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 42/100
-
status:waiting-for-triage type:bug
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
microsoftgraph/msgraph-sdk-javascript#1999 · 2 comentarios · 1 reacción ·
-
status:waiting-for-triage type:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Todos los issues de microsoftgraph/msgraph-sdk-javascript
Issues similares
-
[Bug]: Discord Activity titles with emoji are rejected as over 80 characters when they are not Abiertoclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
supermomonga/zcode-acp#24 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
growthbook/growthbook#7100 ·
-
triage
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100