Skip to content

Fetch request is always sent with Accept: application/json header #477

Open
@iansan5653

Description

@iansan5653

Describe the bug
I have an API that has some JSON endpoints and some file endpoints (media type application/octet-stream). The generated code works for the JSON endpoints, but for the file endpoints the server returns 406 because the code always sends the request with header Accept: application/json.

If there is no 200 response described with media type application/json, the generated code should use the first media type described or it should be a method parameter.

I'm using the Fetch API with version 0.7.0.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions