Skip to content

Add streaming decoder support - #3494

Open
trumpetinc wants to merge 70 commits into
OpenFeign:14.xfrom
trumpetinc:streaming_decoder_support
Open

Add streaming decoder support#3494
trumpetinc wants to merge 70 commits into
OpenFeign:14.xfrom
trumpetinc:streaming_decoder_support

Conversation

@trumpetinc

@trumpetinc trumpetinc commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Adds support for streaming decode for Feign RequestLine methods that return InputStream or Reader.

To use:

  interface LargeStreamTestInterface {

    @RequestLine("GET /")
    InputStream getLargeStream();

    @RequestLine("GET /")
    Reader getLargeReader();
  }
public void test(){
  try(InputStream is = myLargeStreamTestInterface.getLargeStream()){
     // process the is
  }
}

Changes

  1. InvocationContext now leaves the response stream open if the return type from the decoder implements Closeable
  2. New InputStreamAndReaderDecoder class that can be registered with the Feign builder.decoder() method. Supports passing the decode request to a delegate if the method return type is not InputStream or Reader. If the return type is Reader, the charset of the response Content-Type header is used. If no charset is specified in the header, UTF-8 is assumed.
  3. New ContentTypeParser utility method for obtaining information from the Content-Type header

dependabot Bot and others added 30 commits June 26, 2026 05:15
Bumps [io.undertow:undertow-core](https://github.com/undertow-io/undertow) from 2.4.1.Final to 2.4.2.Final.
- [Release notes](https://github.com/undertow-io/undertow/releases)
- [Commits](undertow-io/undertow@2.4.1.Final...2.4.2.Final)

---
updated-dependencies:
- dependency-name: io.undertow:undertow-core
  dependency-version: 2.4.2.Final
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…undertow-undertow-core-2.4.2.Final

build(deps-dev): Bump io.undertow:undertow-core from 2.4.1.Final to 2.4.2.Final
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit-framework) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](junit-team/junit-framework@r6.1.0...r6.1.1)

---
updated-dependencies:
- dependency-name: org.junit:junit-bom
  dependency-version: 6.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
….junit-junit-bom-6.1.1

build(deps): Bump org.junit:junit-bom from 6.1.0 to 6.1.1
Bumps [org.apache.httpcomponents.client5:httpclient5](https://github.com/apache/httpcomponents-client) from 5.6.1 to 5.6.2.
- [Changelog](https://github.com/apache/httpcomponents-client/blob/rel/v5.6.2/RELEASE_NOTES.txt)
- [Commits](apache/httpcomponents-client@rel/v5.6.1...rel/v5.6.2)

---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.client5:httpclient5
  dependency-version: 5.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [com.gradle:common-custom-user-data-maven-extension](https://github.com/gradle/common-custom-user-data-maven-extension) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/gradle/common-custom-user-data-maven-extension/releases)
- [Commits](gradle/common-custom-user-data-maven-extension@v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: com.gradle:common-custom-user-data-maven-extension
  dependency-version: 2.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [com.google.http-client:google-http-client](https://github.com/googleapis/google-http-java-client) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](googleapis/google-http-java-client@v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: com.google.http-client:google-http-client
  dependency-version: 2.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
….gradle-common-custom-user-data-maven-extension-2.3.0

build(deps): Bump com.gradle:common-custom-user-data-maven-extension from 2.2.0 to 2.3.0
….apache.httpcomponents.client5-httpclient5-5.6.2

build(deps): Bump org.apache.httpcomponents.client5:httpclient5 from 5.6.1 to 5.6.2
….google.http-client-google-http-client-2.1.1

build(deps): Bump com.google.http-client:google-http-client from 2.1.0 to 2.1.1
Bumps [com.github.jknack:handlebars](https://github.com/jknack/handlebars.java) from 4.5.2 to 4.5.3.
- [Release notes](https://github.com/jknack/handlebars.java/releases)
- [Commits](jknack/handlebars.java@v4.5.2...v4.5.3)

---
updated-dependencies:
- dependency-name: com.github.jknack:handlebars
  dependency-version: 4.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps com.gradle:develocity-maven-extension from 2.4.2 to 2.5.0.

---
updated-dependencies:
- dependency-name: com.gradle:develocity-maven-extension
  dependency-version: 2.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
….gradle-develocity-maven-extension-2.5.0

build(deps-dev): Bump com.gradle:develocity-maven-extension from 2.4.2 to 2.5.0
….github.jknack-handlebars-4.5.3

build(deps): Bump com.github.jknack:handlebars from 4.5.2 to 4.5.3
Bumps [org.openrewrite.recipe:rewrite-migrate-java](https://github.com/openrewrite/rewrite-migrate-java) from 3.38.0 to 3.39.0.
- [Release notes](https://github.com/openrewrite/rewrite-migrate-java/releases)
- [Commits](openrewrite/rewrite-migrate-java@v3.38.0...v3.39.0)

---
updated-dependencies:
- dependency-name: org.openrewrite.recipe:rewrite-migrate-java
  dependency-version: 3.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.openrewrite.maven:rewrite-maven-plugin](https://github.com/openrewrite/rewrite-maven-plugin) from 6.42.0 to 6.43.0.
- [Release notes](https://github.com/openrewrite/rewrite-maven-plugin/releases)
- [Commits](openrewrite/rewrite-maven-plugin@v6.42.0...v6.43.0)

---
updated-dependencies:
- dependency-name: org.openrewrite.maven:rewrite-maven-plugin
  dependency-version: 6.43.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
….openrewrite.recipe-rewrite-migrate-java-3.39.0

build(deps): Bump org.openrewrite.recipe:rewrite-migrate-java from 3.38.0 to 3.39.0
….openrewrite.maven-rewrite-maven-plugin-6.43.0

build(deps-dev): Bump org.openrewrite.maven:rewrite-maven-plugin from 6.42.0 to 6.43.0
Bumps [org.openrewrite.recipe:rewrite-testing-frameworks](https://github.com/openrewrite/rewrite-testing-frameworks) from 3.40.0 to 3.41.0.
- [Release notes](https://github.com/openrewrite/rewrite-testing-frameworks/releases)
- [Commits](openrewrite/rewrite-testing-frameworks@v3.40.0...v3.41.0)

---
updated-dependencies:
- dependency-name: org.openrewrite.recipe:rewrite-testing-frameworks
  dependency-version: 3.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
….openrewrite.recipe-rewrite-testing-frameworks-3.41.0

build(deps): Bump org.openrewrite.recipe:rewrite-testing-frameworks from 3.40.0 to 3.41.0
Bumps `netty.version` from 4.2.15.Final to 4.2.16.Final.

Updates `io.netty:netty-bom` from 4.2.15.Final to 4.2.16.Final
- [Release notes](https://github.com/netty/netty/releases)
- [Commits](netty/netty@netty-4.2.15.Final...netty-4.2.16.Final)

Updates `io.netty:netty-handler` from 4.2.15.Final to 4.2.16.Final
- [Release notes](https://github.com/netty/netty/releases)
- [Commits](netty/netty@netty-4.2.15.Final...netty-4.2.16.Final)

Updates `io.netty:netty-codec-http` from 4.2.15.Final to 4.2.16.Final
- [Release notes](https://github.com/netty/netty/releases)
- [Commits](netty/netty@netty-4.2.15.Final...netty-4.2.16.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-bom
  dependency-version: 4.2.16.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.netty:netty-handler
  dependency-version: 4.2.16.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.netty:netty-codec-http
  dependency-version: 4.2.16.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…ty.version-4.2.16.Final

build(deps): Bump netty.version from 4.2.15.Final to 4.2.16.Final
Bumps `jackson.version` from 2.22.0 to 2.22.1.

Updates `com.fasterxml.jackson:jackson-bom` from 2.22.0 to 2.22.1
- [Commits](FasterXML/jackson-bom@jackson-bom-2.22.0...jackson-bom-2.22.1)

Updates `com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider` from 2.22.0 to 2.22.1

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson:jackson-bom
  dependency-version: 2.22.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider
  dependency-version: 2.22.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps `vertx.version` from 5.1.3 to 5.1.4.

Updates `io.vertx:vertx-junit5` from 5.1.3 to 5.1.4
- [Commits](eclipse-vertx/vertx-junit5@5.1.3...5.1.4)

Updates `io.vertx:vertx-web-client` from 5.1.3 to 5.1.4
- [Commits](vert-x3/vertx-web@5.1.3...5.1.4)

---
updated-dependencies:
- dependency-name: io.vertx:vertx-junit5
  dependency-version: 5.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: io.vertx:vertx-web-client
  dependency-version: 5.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…tx/feign-vertx5-test/vertx.version-5.1.4

build(deps-dev): Bump vertx.version from 5.1.3 to 5.1.4 in /vertx/feign-vertx5-test
…kson.version-2.22.1

build(deps): Bump jackson.version from 2.22.0 to 2.22.1
Bumps `vertx.version` from 4.5.28 to 4.5.29.

Updates `io.vertx:vertx-junit5` from 4.5.28 to 4.5.29
- [Commits](eclipse-vertx/vertx-junit5@4.5.28...4.5.29)

Updates `io.vertx:vertx-web-client` from 4.5.28 to 4.5.29
- [Commits](vert-x3/vertx-web@4.5.28...4.5.29)

---
updated-dependencies:
- dependency-name: io.vertx:vertx-junit5
  dependency-version: 4.5.29
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: io.vertx:vertx-web-client
  dependency-version: 4.5.29
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…tx/feign-vertx4-test/vertx.version-4.5.29

build(deps-dev): Bump vertx.version from 4.5.28 to 4.5.29 in /vertx/feign-vertx4-test
Bumps [tools.jackson:jackson-bom](https://github.com/FasterXML/jackson-bom) from 3.2.0 to 3.2.1.
- [Commits](FasterXML/jackson-bom@jackson-bom-3.2.0...jackson-bom-3.2.1)

---
updated-dependencies:
- dependency-name: tools.jackson:jackson-bom
  dependency-version: 3.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit-framework) from 6.1.1 to 6.1.2.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](junit-team/junit-framework@r6.1.1...r6.1.2)

---
updated-dependencies:
- dependency-name: org.junit:junit-bom
  dependency-version: 6.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
dependabot Bot and others added 14 commits July 21, 2026 05:13
Bumps [org.openrewrite.recipe:rewrite-testing-frameworks](https://github.com/openrewrite/rewrite-testing-frameworks) from 3.42.0 to 3.42.1.
- [Release notes](https://github.com/openrewrite/rewrite-testing-frameworks/releases)
- [Commits](openrewrite/rewrite-testing-frameworks@v3.42.0...v3.42.1)

---
updated-dependencies:
- dependency-name: org.openrewrite.recipe:rewrite-testing-frameworks
  dependency-version: 3.42.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…tx/feign-vertx4-test/vertx.version-4.5.31

build(deps-dev): Bump vertx.version from 4.5.30 to 4.5.31 in /vertx/feign-vertx4-test
….google.http-client-google-http-client-2.2.0

build(deps): Bump com.google.http-client:google-http-client from 2.1.1 to 2.2.0
….openrewrite.recipe-rewrite-testing-frameworks-3.42.1

build(deps): Bump org.openrewrite.recipe:rewrite-testing-frameworks from 3.42.0 to 3.42.1
Bumps `license-maven-plugin.version` from 5.0.0 to 5.1.1.

Updates `com.mycila:license-maven-plugin-git` from 5.0.0 to 5.1.1
- [Release notes](https://github.com/mathieucarbou/license-maven-plugin/releases)
- [Changelog](https://github.com/mathieucarbou/license-maven-plugin/blob/master/docs/releases.md)
- [Commits](mathieucarbou/license-maven-plugin@v5.0.0...v5.1.1)

Updates `com.mycila:license-maven-plugin` from 5.0.0 to 5.1.1
- [Release notes](https://github.com/mathieucarbou/license-maven-plugin/releases)
- [Changelog](https://github.com/mathieucarbou/license-maven-plugin/blob/master/docs/releases.md)
- [Commits](mathieucarbou/license-maven-plugin@v5.0.0...v5.1.1)

---
updated-dependencies:
- dependency-name: com.mycila:license-maven-plugin-git
  dependency-version: 5.1.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.mycila:license-maven-plugin
  dependency-version: 5.1.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…ense-maven-plugin.version-5.1.1

build(deps): Bump license-maven-plugin.version from 5.0.0 to 5.1.1
Bumps [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](apache/maven-jar-plugin@maven-jar-plugin-3.5.0...maven-jar-plugin-3.5.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-version: 3.5.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
….apache.maven.plugins-maven-jar-plugin-3.5.1

build(deps): Bump org.apache.maven.plugins:maven-jar-plugin from 3.5.0 to 3.5.1
Bumps [org.apache.maven.plugins:maven-toolchains-plugin](https://github.com/apache/maven-toolchains-plugin) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/apache/maven-toolchains-plugin/releases)
- [Commits](apache/maven-toolchains-plugin@maven-toolchains-plugin-3.2.0...maven-toolchains-plugin-3.3.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-toolchains-plugin
  dependency-version: 3.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
….apache.maven.plugins-maven-toolchains-plugin-3.3.0

build(deps-dev): Bump org.apache.maven.plugins:maven-toolchains-plugin from 3.2.0 to 3.3.0
no easy mechanism for closing a JUL log file once it is used, so we'll
ignore the deletion failure.
@trumpetinc

Copy link
Copy Markdown
Contributor Author

@yvasyliev I would appreciate code review/feedback if you have time!

@trumpetinc
trumpetinc changed the base branch from master to 14.x July 28, 2026 01:26
@trumpetinc

Copy link
Copy Markdown
Contributor Author

@velo can you please let me know what is going on with the failed security/snyk check? circleci says I don't have access...

@trumpetinc

Copy link
Copy Markdown
Contributor Author

@velo making sure this didn't get lost in the shuffle. Can you please let me know what is going on with the failed security/snyk check? circleci says I don't have access... I would really like to get this SR in.

@yvasyliev

Copy link
Copy Markdown
Contributor

I think this feature should be part of the DefaultDecoder

@velo

velo commented Jul 31, 2026

Copy link
Copy Markdown
Member

what is going on with the failed security/snyk check?

image

🤦‍♂️

@trumpetinc

Copy link
Copy Markdown
Contributor Author

@velo I didn't touch that file, and this PR has nothing to do with SOAP. So I don't understand why this PR would be held up for it...

What is the protocol for moving forward?

@trumpetinc

Copy link
Copy Markdown
Contributor Author

I think this feature should be part of the DefaultDecoder

I am going to need some explanation for the API module vs the core module. Because to put it in DefaultDecoder, I need to put this new code into the API module.

I am puzzled about the fact that there is no explanation for why the classes in the API module were split out from core - and why there isn't a migration explanation for what appears to be a massive refactor.

Is there anything that explains what is going on with this API module?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants