Skip to content

Commit

Permalink
fix: send correct Accept header for certain endpoints (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Jan 10, 2025
1 parent 653617c commit 7b7bc98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/resources/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export class Files extends APIResource {
* Download file
*/
download(fileId: string, options?: Core.RequestOptions): Core.APIPromise<Response> {
return this._client.get(`/v1/files/${fileId}/download`, { ...options, __binaryResponse: true });
return this._client.get(`/v1/files/${fileId}/download`, {
...options,
headers: { Accept: 'application/octet-stream', ...options?.headers },
__binaryResponse: true,
});
}

/**
Expand Down

0 comments on commit 7b7bc98

Please sign in to comment.