@@ -91,7 +91,9 @@ inline fun <reified T : Any> RequestBodySpec.bodyValueWithType(body: T): Request
91
91
*/
92
92
suspend fun <T : Any > RequestHeadersSpec <out RequestHeadersSpec <* >>.awaitExchange (responseHandler : suspend (ClientResponse ) -> T ): T {
93
93
val context = currentCoroutineContext().minusKey(Job .Key )
94
- return withContext(context.toReactorContext()) { exchangeToMono { mono(context) { responseHandler.invoke(it) } }.awaitSingle() }
94
+ return withContext(context.toReactorContext()) {
95
+ exchangeToMono { mono(context) { responseHandler.invoke(it) } }.awaitSingle()
96
+ }
95
97
}
96
98
97
99
/* *
@@ -101,7 +103,9 @@ suspend fun <T: Any> RequestHeadersSpec<out RequestHeadersSpec<*>>.awaitExchange
101
103
*/
102
104
suspend fun <T : Any > RequestHeadersSpec <out RequestHeadersSpec <* >>.awaitExchangeOrNull (responseHandler : suspend (ClientResponse ) -> T ? ): T ? {
103
105
val context = currentCoroutineContext().minusKey(Job .Key )
104
- return withContext(context.toReactorContext()) { exchangeToMono { mono(context) { responseHandler.invoke(it) } }.awaitSingleOrNull() }
106
+ return withContext(context.toReactorContext()) {
107
+ exchangeToMono { mono(context) { responseHandler.invoke(it) } }.awaitSingleOrNull()
108
+ }
105
109
}
106
110
107
111
/* *
@@ -183,7 +187,9 @@ suspend inline fun <reified T : Any> WebClient.ResponseSpec.awaitBodyOrNull() :
183
187
*/
184
188
suspend fun WebClient.ResponseSpec.awaitBodilessEntity (): ResponseEntity <Void > {
185
189
val context = currentCoroutineContext().minusKey(Job .Key )
186
- return withContext(context.toReactorContext()) { toBodilessEntity().awaitSingle() }
190
+ return withContext(context.toReactorContext()) {
191
+ toBodilessEntity().awaitSingle()
192
+ }
187
193
}
188
194
189
195
/* *
@@ -222,11 +228,13 @@ inline fun <reified T : Any> WebClient.ResponseSpec.toEntityFlux(): Mono<Respons
222
228
* propagation to the [CoExchangeFilterFunction]. This extension is not subject to type erasure
223
229
* and retains actual generic type arguments.
224
230
*
225
- * @since 7.0.0
231
+ * @since 7.0
226
232
*/
227
233
suspend inline fun <reified T : Any > WebClient.ResponseSpec.awaitEntity (): ResponseEntity <T > {
228
234
val context = currentCoroutineContext().minusKey(Job .Key )
229
- return withContext(context.toReactorContext()) { toEntity(T ::class .java).awaitSingle() }
235
+ return withContext(context.toReactorContext()) {
236
+ toEntity(T ::class .java).awaitSingle()
237
+ }
230
238
}
231
239
232
240
@PublishedApi
0 commit comments