Skip to content

Need DownloadStreamAsync version that allows reading the status code? #1823

@kendallb

Description

@kendallb

Is your feature request related to a problem? Please describe.
Presently when you use DownloadStreamAsync, you just get the stream as a result. if the request fails for some reason, there is no way to get the status code (or as another user was asking for, a way to get the headers from the response also). In our case, sometimes we might get an unauthorized response if we need to regenerate auth key, so we check for that response, get the new auth key and then re-run the request. But we cannot do that if we cannot see the response status code.

Describe the solution you'd like
Either the DownloadStreamAsync function needs some functionality added to allow this, or a new overload created that would return the headers etc as well as the response data?

I think it was suggested previously that the response data could be made lazy, so you could read the response stream somehow via the normal Execute request if you need extra functionality from the download stream code?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions