Remove bodyWithType extension from WebFlux

Since there is no more clash with the new bodyValue
method name.

Closes gh-23523
This commit is contained in:
Sebastien Deleuze
2019-08-28 12:15:55 +02:00
parent 14558844bc
commit 52976246ac
6 changed files with 29 additions and 56 deletions

View File

@@ -231,8 +231,8 @@ ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).body(person, Person.
[source,kotlin,role="secondary"]
.Kotlin
----
val person: Mono<Person> = ...
ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).bodyWithType<Person>(person)
val person: Person = ...
ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).bodyValue(person)
----
The following example shows how to build a 201 (CREATED) response with a `Location` header and no body:
@@ -262,7 +262,7 @@ ServerResponse.ok().hint(Jackson2CodecSupport.JSON_VIEW_HINT, MyJacksonView.clas
[source,kotlin,role="secondary"]
.Kotlin
----
ServerResponse.ok().hint(Jackson2CodecSupport.JSON_VIEW_HINT, MyJacksonView::class.java).bodyWithType(...)
ServerResponse.ok().hint(Jackson2CodecSupport.JSON_VIEW_HINT, MyJacksonView::class.java).body(...)
----
====

View File

@@ -497,7 +497,7 @@ like `Mono` or Kotlin Coroutines `Deferred` as the following example shows:
client.post()
.uri("/persons/{id}", id)
.contentType(MediaType.APPLICATION_JSON)
.bodyWithType<Person>(personDeferred)
.body<Person>(personDeferred)
.retrieve()
.awaitBody<Unit>()
----
@@ -524,7 +524,7 @@ You can also have a stream of objects be encoded, as the following example shows
client.post()
.uri("/persons/{id}", id)
.contentType(MediaType.APPLICATION_JSON)
.bodyWithType(people)
.body(people)
.retrieve()
.awaitBody<Unit>()
----