Open juergenzimmermann opened 5 years ago
GatewayFilterSpec (https://github.com/spring-cloud/spring-cloud-gateway/blob/master/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java) has the Java methods modifyRequestBody and modifyResponseBody with arguments of type Class<T>. It would be nice to have Kotlin Extension Functions with reified types just as implemented by @sdeleuze for the Spring Framework.
GatewayFilterSpec
modifyRequestBody
modifyResponseBody
Class<T>
Then in Kotlin one could write e.g. modifyResponseBody<String, String> { … } instead of modifyResponseBody(String::class.java, String::class.java) { … }.
modifyResponseBody<String, String> { … }
modifyResponseBody(String::class.java, String::class.java) { … }
PRs welcome
I'd like to help with this, if nobody has started the work
GatewayFilterSpec
(https://github.com/spring-cloud/spring-cloud-gateway/blob/master/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java) has the Java methodsmodifyRequestBody
andmodifyResponseBody
with arguments of typeClass<T>
. It would be nice to have Kotlin Extension Functions with reified types just as implemented by @sdeleuze for the Spring Framework.Then in Kotlin one could write e.g.
modifyResponseBody<String, String> { … }
instead ofmodifyResponseBody(String::class.java, String::class.java) { … }
.