Skip to content

Use enum instead of boolean for eagerlyReadResponse #28033

Description

@kasobol-msft

Today, RestProxy takes care of disposing response if there's no need to process body, i.e. there's Response<Foo, Void>.

Related code:

return response.getSourceResponse().getBody().ignoreElements()

and

We can (probably) simplify this logic a bit by introducing enum to cover the requested response type and also release a connection a little bit faster.
We can consider an enum ResponseBodyReadStrategy { EAGER, STREAMED, NO_RESPONSE_BODY } and take care of that handling at http client layer instead in rest proxy.
Something like:
image

Metadata

Metadata

Assignees

Labels

Azure.Coreazure-coreClientThis issue points to a problem in the data-plane of the library.HttpClientpillar-performanceThe issue is related to performance, one of our core engineering pillars.

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions