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

JDK 11 HttpClient integration with WebClient [SPR-16469] #21014

Closed
spring-issuemaster opened this issue Feb 5, 2018 · 5 comments · May be fixed by #23432
Closed

JDK 11 HttpClient integration with WebClient [SPR-16469] #21014

spring-issuemaster opened this issue Feb 5, 2018 · 5 comments · May be fixed by #23432

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Feb 5, 2018

Rossen Stoyanchev opened SPR-16469 and commented

According to this blog post the HttpClient "handles request and response bodies as reactive-streams", and it is currently in incubation status, but will be made official in JDK 11 when it will switch to java.net from jdk.incubator.

Given the JDK 11 release dates, this is probably a 5.2 target. However, at present, we need to experiment with the proposed API to see if there any issues in adapting it through a ClientHttpConnector, and raise issues if necessary.

JDK HTTP Client - JEP 321 - Update


Affects: 5.0.3

Issue Links:

  • #21016 JDK 11 WebSocket integration with WebSocketClient
  • #19658 Jetty HTTP client integration with WebClient

0 votes, 6 watchers

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Mar 29, 2018

Sébastien Deleuze commented

A draft prototype can be found at https://github.com/sdeleuze/jdk-http-webclient/.
It is using Reactor EmitterProcessor + Flow to RS passthrough bridge to adapt from Flow.subscriber to Flux.
Integration tests are all green even if more test is required.
To be discussed in our next reactive meeting

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Apr 5, 2018

Sébastien Deleuze commented

Our integration tests are all green with regular HTTP endpoints but not with streaming ones. I have sent a mail to the net-dev mailing list to describe the issue and get a feedback.

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Apr 5, 2018

Sébastien Deleuze commented

Leveraging a PublishingBodySubscriber copy from JDK-8201186, streaming tests pass as well.

Since this feature provides a Publisher based API and allows to have the lifecycle we were expecting (body available just after status and headers), I have added our +1 for this proposal on the mailing list in order to ask inclusion in JDK 11 out of the box.

@sdeleuze
Copy link
Contributor

@sdeleuze sdeleuze commented Jan 31, 2019

I have upgraded the prototype to JDK 11 and Spring Framework 5.1, but it seems most tests are broken. Most significant change has been that we now leverage BodyPublishers.fromPublisher, so maybe the issue is on that part. I won't spend more time on that for now since this is not a Spring Framework 5.2 topic anymore, but we will have to fix that at some point.

Julien-Eyraud pushed a commit to Julien-Eyraud/spring-framework that referenced this issue Aug 7, 2019
This a simple implementation of ClientHttpResponse that levrage
JDK 11 HttpClient.

Close spring-projectsgh-21014
Julien-Eyraud pushed a commit to Julien-Eyraud/spring-framework that referenced this issue Aug 7, 2019
This a simple implementation of ClientHttpResponse that levrage
JDK 11 HttpClient.

Closes spring-projectsgh-21014
Julien-Eyraud pushed a commit to Julien-Eyraud/spring-framework that referenced this issue Aug 27, 2019
This a simple implementation of ClientHttpResponse that levrage
JDK 11 HttpClient.

Closes spring-projectsgh-21014
@rstoyanchev
Copy link
Contributor

@rstoyanchev rstoyanchev commented Nov 8, 2019

I'm marking this superseded by #23432 which seems to be close enough to the prototype here.

@rstoyanchev rstoyanchev closed this Nov 8, 2019
@rstoyanchev rstoyanchev removed this from the 5.x Backlog milestone Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.