Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Kotlin coroutine #21

Open
emax19 opened this issue Jul 21, 2021 · 0 comments
Open

Support for Kotlin coroutine #21

emax19 opened this issue Jul 21, 2021 · 0 comments

Comments

@emax19
Copy link

emax19 commented Jul 21, 2021

Hi, what about writing an adapter for the kotlin coroutine compatibility?

package com.demo.feign

import kotlinx.coroutines.flow.Flow
import org.springframework.web.bind.annotation.GetMapping
import reactivefeign.spring.config.ReactiveFeignClient
import reactor.core.publisher.Flux
import reactor.core.publisher.Mono

@ReactiveFeignClient(
    name = "helloClient",
    url = "http://localhost:8080"
)
interface HelloClient {

    @GetMapping("/hello")
    fun helloMono(): Mono<String>
    
    @GetMapping("/hello")
    suspend fun helloKotlinMono(): String

    @GetMapping("/hello")
    fun helloFlux(): Flux<String>

    @GetMapping("/hello")
    fun helloKotlinFlux(): Flow<String>
    
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant