Skip to content
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

ByteBody-based response handling for the HTTP client #11177

Merged
merged 17 commits into from
Sep 20, 2024
Merged

Conversation

yawkat
Copy link
Member

@yawkat yawkat commented Sep 11, 2024

First version of replacing the previous mixed response handling with a single ByteBody-based handler (similar to PipeliningServerHandler on the server). The purpose of this is to (a) unify some code between the streaming and aggregating code paths in DefaultHttpClient, (b) allow ByteBody-based streaming for ProxyHttpClient in the future so that ProxyHttpClient can be implemented for the jdk client and servlet server, (c) eventually create a ByteBody-based HTTP client API (maybe just in ConnectionManager) that allows lower level access to the request and thus can be used to implement the oci sdk http client.

This is an intermediate PR of my refactor, in the interest of keeping the changes reviewable.
First version of replacing the previous mixed response handling with a single ByteBody-based handler (similar to PipeliningServerHandler on the server). The purpose of this is to (a) unify some code between the streaming and aggregating code paths in DefaultHttpClient, (b) allow ByteBody-based streaming for ProxyHttpClient in the future so that ProxyHttpClient can be implemented for the jdk client and servlet server, (c) eventually create a ByteBody-based HTTP client API (maybe just in ConnectionManager) that allows lower level access to the request and thus can be used to implement the oci sdk http client.
# Conflicts:
#	http-netty/src/main/java/io/micronaut/http/netty/body/StreamingNettyByteBody.java
# Conflicts:
#	http-netty/src/main/java/io/micronaut/http/netty/body/StreamingNettyByteBody.java
# Conflicts:
#	http-netty/src/main/java/io/micronaut/http/netty/body/StreamingNettyByteBody.java
@yawkat yawkat mentioned this pull request Sep 13, 2024
Base automatically changed from client-request-body to 4.7.x September 19, 2024 11:08
@yawkat yawkat marked this pull request as ready for review September 19, 2024 11:09
@yawkat yawkat added the type: improvement A minor improvement to an existing feature label Sep 19, 2024
@yawkat yawkat added this to the 4.7.0 milestone Sep 19, 2024
# Conflicts:
#	http-client/src/main/java/io/micronaut/http/client/netty/DefaultHttpClient.java
@yawkat
Copy link
Member Author

yawkat commented Sep 20, 2024

i added some additional sanity checks in the state transitions of the decoder.

Copy link

sonarcloud bot commented Sep 20, 2024

@yawkat yawkat merged commit 89f5f21 into 4.7.x Sep 20, 2024
21 checks passed
@yawkat yawkat deleted the client-response-body branch September 20, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants