Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file response type or the response headers to blob #350

Open
1 task
pvasilek opened this issue Jan 9, 2024 · 5 comments
Open
1 task

Add file response type or the response headers to blob #350

pvasilek opened this issue Jan 9, 2024 · 5 comments

Comments

@pvasilek
Copy link

pvasilek commented Jan 9, 2024

Describe the feature

File downloading can parse a filename from the response header 'content-disposition'. As I see there is no way neither to get response headers nor the filenames.
It may be also extra parameter for .then(($blob, $headers) => {})
Not sure if it will work as
async onResponse({ request, response, options }) {
console.log("[fetch response]", response, JSON.stringify(response.headers))
},
shows no headers at all.

Additional information

  • Would you be willing to help implement this feature?
@SeppeMarien
Copy link

+1

1 similar comment
@valh1996
Copy link

valh1996 commented Feb 15, 2024

+1

@kingyue737
Copy link

ofetch.raw also returns a response with empty headers {}

@pvasilek
Copy link
Author

It is not a library. New security features from browsers. I do not think it may be possible to make a fix.

@Lpmvb
Copy link

Lpmvb commented Feb 29, 2024

response.headers.get('content-disposition')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants