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

WebClient should provide CookieStore support [SPR-17616] #22148

Closed
spring-issuemaster opened this issue Dec 21, 2018 · 1 comment
Closed

WebClient should provide CookieStore support [SPR-17616] #22148

spring-issuemaster opened this issue Dec 21, 2018 · 1 comment

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Dec 21, 2018

GanMing opened SPR-17616 and commented

I encountered a problem with cookie management when I migrated the StatefullRestTemplate to WebClient.

StatefullRestTemplate

I expect to be able to provide a method compatible with the implementation of java.net.CookieStore, I found the following information.

CookieStoreImpl

Or Reactor Netty's HttpClient can provide features like CookieStore.


Affects: 5.1.3

@poutsma

This comment has been minimized.

Copy link
Contributor

@poutsma poutsma commented Jan 28, 2019

You ask for a java.net.CookieStore, yet the code you link to uses a org.apache.http.client.CookieStore, which are similar but not the same.

At any rate, the WebClient exposes cookies as a Map, which should be similarly convenient. See
defaultCookies and cookies.

Alternatively, it seems that Jetty does support java.net.CookieStore, so you could use that as the underlying library, see here.

@poutsma poutsma changed the title WebClient provides easy-to-use CookieStore support [SPR-17616] WebClient should provide CookieStore support [SPR-17616] Jan 28, 2019
@poutsma poutsma closed this Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.