Skip to content

Headers not correctly passed to fetch client #2375

@dakivara

Description

@dakivara

I noticed that my headers were missing when I call myFun({ headers }). The myFun was generated with orval. In my case, headers has type Headers. I looked into the generated code and found this line of code which causes the problem:

headers: { 'Content-Type': 'application/json', ...options?.headers }

The problem is that {...headers} is always an empty object.

Metadata

Metadata

Assignees

Labels

fetchFetch client related issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions