Skip to content

Conversation

@poutsma
Copy link
Contributor

@poutsma poutsma commented Mar 29, 2017

Please read the individual commit messages for more information.

@rstoyanchev Can this be merged?

poutsma added 2 commits March 29, 2017 14:10
This commit deprecates `AsyncRestTemplate` and related types (`AsyncClientHttpRequestFactory` etc.) in favor of the Spring 5.0 `WebClient`. Issue: SPR-15294
This commit makes a couple of changes to WebClient and WebTestClient, in oder to facilitate providing the request body as Object, and getting the response body as a `Mono<Object>` or `Flux<Object>` (without having to deal with `ClientResponse`. Specifically, this commit: - Moves methods that operate on the request body to a RequestBodySpec in both WebClient and WebTestClient, and rename them to `body` (SPR-15394). These methods now just *set* the body, without performing an exchange (which now requires an explicit exchange call). - Parameterizes UriSpec in both WebClient and WebTestClient, so that it returns either a RequestHeadersSpec or a RequestBodySpec (SPR-15394). - Adds `RequestHeaderSpec.retrieve` methods, next to `exchange`, that return the response body (and not a `ClientResponse`). Two convenience methods return the response body as `Mono` or `Flux`. - Adds ClientResponse.toRequestEntity to convert the ClientResponse into a RequestEntity. Issue: SPR-15294, SPR-15394
@poutsma
Copy link
Contributor Author

poutsma commented Mar 29, 2017

Note that 957f503 (deprecating AsyncRestTemplate) has already been cherry-picked into master.

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Mar 29, 2017

I have further split the second commit into two separating out the request body from the response body changes. The former is already in master 118f33a.

I am closing this PR but will separately ping you about the remaining changes which I have in a branch.

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

Labels

None yet

2 participants