Closed jalauzon-msft closed 1 week ago
After https://github.com/Azure/autorest.python/pull/2605, we switch to rest responses. For backward compatiblility, rest responses still has stream_download.
@msyyc I think you misunderstood the ask. Stream_download is called from inside the codegen, so customer don't control the kwarg that can be injected when it's called. Jacob would like a way to do it.
@msyyc I think you misunderstood the ask. Stream_download is called from inside the codegen, so customer don't control the kwarg that can be injected when it's called. Jacob would like a way to do it.
I quite get what you mean and https://github.com/Azure/autorest.python/issues/2618#issuecomment-2159934311 is just hint for me that it is doable even if we covert to rest responses after https://github.com/Azure/autorest.python/pull/2605. Now I am still waiting for @johanste opinion in teams channel and appreciate if you could help ping him. @lmazuel
After discussion, SDK team is OK to expose new kwargs
decompress
and I will begin the coding soon.
Currently Storage generated code
response.stream_download
in all download APIs (Example). Azure Core's StreamDownloadGenerator (whichstream_download
returns) takes adecompress
keyword arg to configure whether the response is automatically decompressed during download for relevant content encodings.We would like to be able to expose this option to our users but the generated code does not have a way to pass anything to the
stream_download
method. It would be great if there was a way to pass at leastdecompress
into this call from our hand-written code.