Skip to content

Commit

Permalink
use mono.just for post body
Browse files Browse the repository at this point in the history
  • Loading branch information
adinauer committed Mar 6, 2025
1 parent a3be332 commit 3c4b712
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Mono<Person> create(@RequestBody Person person) {
.header(
HttpHeaders.AUTHORIZATION,
"Basic " + HttpHeaders.encodeBasicAuth("user", "password", Charset.defaultCharset()))
.body(person, Person.class)
.body(Mono.just(person), Person.class)
.retrieve()
.bodyToMono(Person.class)
.map(response -> response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Mono<Person> create(@RequestBody Person person) {
.header(
HttpHeaders.AUTHORIZATION,
"Basic " + HttpHeaders.encodeBasicAuth("user", "password", Charset.defaultCharset()))
.body(person, Person.class)
.body(Mono.just(person), Person.class)
.retrieve()
.bodyToMono(Person.class)
.map(response -> response);
Expand Down

0 comments on commit 3c4b712

Please sign in to comment.