Closed karmats closed 1 month ago
Can you use the new Fetch API client for this?
That might work @mrlubos. I will have a look and get back to you.
It works with Fetch API client but the code changes needed to use this instead of the (legacy?) fetch-client in our applications (and the fact that it's still in beta) is not something we can do now. We will wait for a stable 1.0 version. I found a solution to this problem by using a response interceptor.
Description
To be able to download Excel or Word files support for
Content-Type: application/vnd.openxmlformats-officedocument.*
is needed.https://github.com/hey-api/openapi-ts/blob/a4eef0fa4f2de71b6af1aed2e09c6caec17f72fc/packages/openapi-ts/src/templates/core/fetch/getResponseBody.hbs#L6 Should add 'application/vnd.openxmlformats-officedocument'. Maybe also 'application/vnd.ms-excel' and 'application/msword'.