Skip to content

v4 HttpPipeline ReadOnlyMemory #3468

Open
@danielmarbach

Description

@danielmarbach

Describe the feature

As of today, the HTTP pipeline supports either Content as byte[] or a stream when the ContentStream property is set. I would appreciate it if the http pipeline could handle ReadOnlyMemory<byte> to support better options for buffering.

Technically you could support ROM already by wrapping the ROM in a ReadOnlyStream that uses the ROM behind the scenes but that would require the Content property to be deprecated and phased out. If the Content property is switched to ROM it probably would also require quite a few changes to the SDK to properly adjust the generator to handle it as well as introducing necessary overloads on the methods that are used to pass in the byte array content. All in all that is too much work to handle as a community contribution and that is why I wanted to open up the discussion whether the team has already ideas how and when they will tackle it.

Another option would be to introduce new properties on the request and response interfaces and slowly transition over

Use Case

More efficient memory handling in the Core of the SDK

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS .NET SDK and/or Package version used

v4

Targeted .NET Platform

All

Operating System and version

All

Metadata

Metadata

Assignees

Labels

feature-requestA feature should be added or improved.module/sdk-corep2This is a standard priority issuev4

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions