-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
New method for downloading streams #2226
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My current thought is to change the interface signature and make Download work differently. Right now, it returns
Task<Stream?>
, which prevents the user to inspect the response for errors. It crashes if the call wasn't successful.So, the idea is to make
ExecuteStreamAsync
, which will returnTask<RestStreamResponse>
. The response will be likeRestResponse
but instead ofContent
it will haveStream?
. Naturally, it requires to beIDisposable
.The first step there was to create a source generator to create instance of
RestResponseBase
child class, as copying those properties manually is error prone (adding a new prop requires many changes). That part is done, so now this thing should be relatively easy.Originally posted by @alexeyzimarev in #2072 (comment)
The text was updated successfully, but these errors were encountered: