http icon indicating copy to clipboard operation
http copied to clipboard

Return Headers when downloading a file

Open RTK opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. In my use case I'd like to download files via this plugin and store a reference in my database. For further procedures I need the mime type which could be retrieved via Content-Type header in the response object. But unfortunately this plugin does not grant access to response metadata when using the downloadFile method.

Describe the solution you'd like Make the HttpDownloadFileResult object extend the HttpResponse so that status code and headers will be returned.

Describe alternatives you've considered Making a request beforehand to get the mime type via HEAD request is not viable since I am doing a lot of requests resulting in 2x the request amount.

Additional context

RTK avatar Jul 07 '20 15:07 RTK

This is a very important feature, caching is impossible without it.

sta55en avatar Jul 08 '20 18:07 sta55en

I would like to add to this request as being able to access headers on the response is a really helpful feature.

nonsenseless avatar Aug 03 '22 17:08 nonsenseless