1 changed files with 13 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||||||
|
package org.springframework.web.reactive.function.client |
||||||
|
|
||||||
|
import org.reactivestreams.Publisher |
||||||
|
|
||||||
|
/** |
||||||
|
* Extension for [WebClient.HeaderSpec.exchange] providing a variant without explicit class |
||||||
|
* parameter thanks to Kotlin reified type parameters. |
||||||
|
* |
||||||
|
* @author Sebastien Deleuze |
||||||
|
* @since 5.0 |
||||||
|
*/ |
||||||
|
inline fun <reified T : Any, S : Publisher<T>> WebClient.HeaderSpec.exchange(publisher: S) = |
||||||
|
exchange(publisher, T::class.java) |
||||||
Loading…
Reference in new issue