@@ -495,45 +495,76 @@ method parameters:
495
495
[[rest-http-interface-return-values]]
496
496
=== Return Values
497
497
498
- Annotated, HTTP exchange methods support the following return values:
498
+ The supported return values vary depending on whether you are using
499
+ `HttpExchangeAdapter` or `ReactorHttpExchangeAdapter`.
500
+
501
+ When using `HttpExchangeAdapter`, annotated HTTP exchange methods support
502
+ the following return values:
499
503
500
504
[cols="1,2", options="header"]
501
505
|===
502
506
| Method return value | Description
503
507
504
- | `void`, `Mono<Void>`
508
+ | `void`
509
+ | Perform the given request.
510
+
511
+ | `HttpHeaders`
512
+ | Perform the given request and return the response headers.
513
+
514
+ | `<T>`
515
+ | Perform the given request and decode the response content to the declared return type.
516
+
517
+ | `ResponseEntity<Void>`
518
+ | Perform the given request and return a `ResponseEntity` with the status and headers.
519
+
520
+ | `ResponseEntity<T>`
521
+ | Perform the given request, decode the response content to the declared return type, and
522
+ return a `ResponseEntity` with the status, headers, and the decoded body.
523
+
524
+ |===
525
+
526
+ When using `ReactorHttpExchangeAdapter`, annotated HTTP exchange methods support
527
+ all the same values as the ones supported by `HttpExchangeAdapter`
528
+ and also the following ones:
529
+
530
+ [cols="1,2", options="header"]
531
+ |===
532
+ | Method return value | Description
533
+
534
+ | `Mono<Void>`
505
535
| Perform the given request, and release the response content, if any.
506
536
507
- | `HttpHeaders`, ` Mono<HttpHeaders>`
537
+ | `Mono<HttpHeaders>`
508
538
| Perform the given request, release the response content, if any, and return the
509
- response headers.
539
+ response headers.
510
540
511
- | `<T>`, ` Mono<T>`
541
+ | `Mono<T>`
512
542
| Perform the given request and decode the response content to the declared return type.
513
543
514
- | `<T>`, ` Flux<T>`
544
+ | `Flux<T>`
515
545
| Perform the given request and decode the response content to a stream of the declared
516
- element type.
546
+ element type.
517
547
518
- | `ResponseEntity<Void>`, ` Mono<ResponseEntity<Void>>`
548
+ | `Mono<ResponseEntity<Void>>`
519
549
| Perform the given request, and release the response content, if any, and return a
520
- `ResponseEntity` with the status and headers.
550
+ `ResponseEntity` with the status and headers.
521
551
522
- | `ResponseEntity<T>`, ` Mono<ResponseEntity<T>>`
552
+ | `Mono<ResponseEntity<T>>`
523
553
| Perform the given request, decode the response content to the declared return type, and
524
- return a `ResponseEntity` with the status, headers, and the decoded body.
554
+ return a `ResponseEntity` with the status, headers, and the decoded body.
525
555
526
556
| `Mono<ResponseEntity<Flux<T>>`
527
557
| Perform the given request, decode the response content to a stream of the declared
528
- element type, and return a `ResponseEntity` with the status, headers, and the decoded
529
- response body stream.
558
+ element type, and return a `ResponseEntity` with the status, headers, and the decoded
559
+ response body stream.
530
560
531
561
|===
532
562
533
563
TIP: You can also use any other async or reactive types registered in the
534
564
`ReactiveAdapterRegistry`.
535
565
536
- By default, the behavior of HTTP service methods with synchronous (blocking) method
566
+ While using the `ReactorHttpExchangeAdapter`, by default, the behavior
567
+ of HTTP service methods with synchronous (blocking) method
537
568
signature depends on connection and timeout settings of the underlying HTTP client.
538
569
`HttpServiceProxyFactory.Builder` does expose a `blockTimeout` option that also lets you
539
570
configure the maximum time to block for a response, but we recommend configuring timeout
0 commit comments