Closed quentin-desbin closed 10 months ago
Hey @quentin-desbin i'm not sure if streams are supported. Probably you will need to add a response interceptor before the axios cache interceptor one to collect the entire stream into a data format it can handle like string or object.
https://github.com/arthurfiorette/axios-cache-interceptor/pull/775 may also help too.
What happened?
It's just a question and maybe a bug.
I use axios to perform a request to my server, but my server returns an StreamingResponseBody (SpringJava), it means that the server will always returns a 200 directly, but the content is an outputstream written "asynchronously".
When using axios and axios-cache-interceptor, the answer saved in cache is empty.
It's recommended to use StreamingResponseBody when manipulating heave multiple assets (blob of images,files, etc.) but i'm not sure it's easily compatible in this case. What do you think about this ?
Thanks !
axios-cache-interceptor version
1.4.1
Node / Browser Version
Chrome 20.0.6099.12
Axios Version
1.6.5
What storage is being used
Web Storage
Relevant debugging log output