I'm finding this question incomplete without proper usage example of how things should be set up.

Since op did not mention target language I'm feeling like to share Kotlin setup that works in my case:

build.gradle.kts

implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("com.playtika.reactivefeign:feign-reactor-core:3.2.1")
implementation("com.playtika.reactivefeign:feign-reactor-spring-configuration:3.2.1")
implementation("com.playtika.reactivefeign:feign-reactor-webclient:3.2.1")

Config.kt

@Configuration
@EnableWebFlux
@EnableReactiveFeignClients
class Config {
}

MyFeignClient.kt

@Component
@ReactiveFeignClient(
        url = "\${package.service.my-service-url}",
        name = "client"
)
interface MyFeignClient {
    @GetMapping(value = ["/my/url?my_param={my_value}"], consumes = ["application/json"])
    fun getValues(
            @PathVariable(name = "my_value") myValue: String?,
        ): Mono<MyEntity?>?
}

Then here goes code in some service class:

val myClient: MyFeignClient = WebReactiveFeign.builder<MyFeignClient>()
        .contract(ReactiveContract(SpringMvcContract()))
        .target(MyFeignClient::class.java, "http://example.com")
// feel free to add .block() to get unpacked value or just chain your logic further
val response = myClient.getValues(param)
Answer from im_infamous on Stack Overflow
Top answer
1 of 2
10

I'm finding this question incomplete without proper usage example of how things should be set up.

Since op did not mention target language I'm feeling like to share Kotlin setup that works in my case:

build.gradle.kts

implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("com.playtika.reactivefeign:feign-reactor-core:3.2.1")
implementation("com.playtika.reactivefeign:feign-reactor-spring-configuration:3.2.1")
implementation("com.playtika.reactivefeign:feign-reactor-webclient:3.2.1")

Config.kt

@Configuration
@EnableWebFlux
@EnableReactiveFeignClients
class Config {
}

MyFeignClient.kt

@Component
@ReactiveFeignClient(
        url = "\${package.service.my-service-url}",
        name = "client"
)
interface MyFeignClient {
    @GetMapping(value = ["/my/url?my_param={my_value}"], consumes = ["application/json"])
    fun getValues(
            @PathVariable(name = "my_value") myValue: String?,
        ): Mono<MyEntity?>?
}

Then here goes code in some service class:

val myClient: MyFeignClient = WebReactiveFeign.builder<MyFeignClient>()
        .contract(ReactiveContract(SpringMvcContract()))
        .target(MyFeignClient::class.java, "http://example.com")
// feel free to add .block() to get unpacked value or just chain your logic further
val response = myClient.getValues(param)
2 of 2
6

You can check this library: https://github.com/Playtika/feign-reactive

implementation of Feign on Spring WebClient. Brings you the best of two worlds together: concise syntax of Feign to write client-side API on fast, asynchronous and non-blocking HTTP client of Spring WebClient

🌐
GitHub
github.com › kptfh › feign-reactive
GitHub - kptfh/feign-reactive: Reactive Feign client based on Spring WebFlux · GitHub
Brings you the best of two worlds together : concise syntax of Feign to write client side API on fast, asynchronous and non-blocking HTTP client of Spring WebClient.
Starred by 168 users
Forked by 167 users
Languages: Java
Discussions

How to configure Reactive Feign's underlying HttpClient in spring boot? - Stack Overflow
I have a Spring Boot application that uses the feign-reactive library by PlaytikaOSS to create non-blocking HTTP clients using Project Reactor. The library is configured via the following dependenc... More on stackoverflow.com
🌐 stackoverflow.com
Newest 'reactive-feign-client' Questions - Stack Overflow
We are using Spring Boot 2.7.8 and the micrometer-registry-prometheus dependency to capture metrics. We use feign-reactor-webclient:3.2.6 to call out to another service. The metrics being generated by ... ... we are using reactive feign client (com.playtika.reactivefeign:feign-reactor-spri... More on stackoverflow.com
🌐 stackoverflow.com
How to Convert Blocking Feign Clients to Reactive Feign Clients - Stack Overflow
Introduction 1. We have quite a bunch of Spring microservices, some totally reactive (spring-webflux) and some old style (spring-web). 2. We use Feign to define API (and the client) in our microser... More on stackoverflow.com
🌐 stackoverflow.com
spring boot - How to consume basic-authentication protected Restful web service via REACTIVE feign client - Stack Overflow
Note, that this API for manual configurftion of reactive feign clients can differ between different versions of the reactive-feign library. More on stackoverflow.com
🌐 stackoverflow.com
March 10, 2020
🌐
GitHub
github.com › PlaytikaOSS › feign-reactive
GitHub - PlaytikaOSS/feign-reactive: Reactive Feign client inspired by https://github.com/OpenFeign project · GitHub
feign-reactor-spring-cloud-starter : Single dependency to have reactive feign client operabable in your spring cloud application.
Starred by 636 users
Forked by 131 users
Languages: Java
🌐
GitHub
github.com › PlaytikaOSS › feign-reactive › blob › develop › feign-reactor-spring-configuration › README.md
feign-reactive/feign-reactor-spring-configuration/README.md at develop · PlaytikaOSS/feign-reactive
Thus all interfaces annotated with @ReactiveFeignClient annotation will be instantiated and configured as Spring beans · You should specify name attribute in this annotation. Feign client bean will be registered with the name of name + "ReactiveFeignClient" if you had not specified qualifier attribute.
Author: PlaytikaOSS
🌐
Vinsguru
vinsguru.com › spring-webclient-with-feign
Spring WebClient With Feign | Vinsguru
February 5, 2022 - We were able to successfully demonstrate Spring WebClient with Feign to create a declarative reactive client to make HTTP requests without much effort.
🌐
Baeldung
baeldung.com › home › spring › spring boot › spring boot feignclient vs. webclient
Spring Boot FeignClient vs. WebClient | Baeldung
July 1, 2026 - The WebClient is part of the Spring WebFlux library. It’s a non-blocking solution provided by the Spring Reactive Framework to address the performance bottlenecks of synchronous implementations like Feign clients.
🌐
GitHub
github.com › PlaytikaOSS › feign-reactive › blob › develop › README.md
feign-reactive/README.md at develop · PlaytikaOSS/feign-reactive
Implementation of Feign on Spring WebClient. Brings you the best of two worlds together : concise syntax of Feign to write client side API on fast, asynchronous and non-blocking HTTP client of Spring WebClient.
🌐
Medium
medium.com › better-programming › feign-reactive-my-preferred-solution-for-rest-api-consumption-5d79a283b24f
Feign Reactive — My Preferred Solution for REST API Consumption | by Wenqi Glantz | Better Programming
October 24, 2022 - It brings us the best of both worlds: concise syntax of Feign to write client-side API on fast, asynchronous, and non-blocking HTTP client of Spring WebClient.
Find elsewhere
🌐
GitHub
github.com › hzlulu › feign-reactive
GitHub - hzlulu/feign-reactive: Reactive Feign client inspired by https://github.com/OpenFeign project · GitHub
feign-reactor-spring-cloud-starter : Single dependency to have reactive feign client operabable in your spring cloud application.
Author: hzlulu
🌐
Spring Cloud
cloud.spring.io › spring-cloud-openfeign
Spring Cloud OpenFeign
March 31, 2022 - Page Redirection · If you are not redirected automatically, follow the link to latest snapshot documentation
🌐
GitHub
github.com › jnopnop › feign-reactive
GitHub - jnopnop/feign-reactive: Reactive Feign client based on Spring WebFlux · GitHub
Implementation of Feign on Spring WebClient. Brings you the best of two worlds together : concise syntax of Feign to write client side API on fast, asynchronous and non-blocking HTTP client of Spring WebClient.
🌐
Stack Overflow
stackoverflow.com › questions › 79568668 › how-to-configure-reactive-feigns-underlying-httpclient-in-spring-boot
How to configure Reactive Feign's underlying HttpClient in spring boot? - Stack Overflow
Define a custom WebClient.Builder bean with a NettyClientHttpConnector using HttpClient.create().resolver(spec -> spec.retryTcp(true)), and Reactive Feign will auto-use it.
🌐
Spring
docs.spring.io › spring-cloud-openfeign › docs › current › reference › html
Spring Cloud OpenFeign
Until that is done, we recommend using feign-reactive for Spring WebClient support. We discourage using Feign clients in the early stages of application lifecycle, while processing configurations and initialising beans.
🌐
Stack Overflow
stackoverflow.com › questions › tagged › reactive-feign-client
Newest 'reactive-feign-client' Questions - Stack Overflow
We are using Spring Boot 2.7.8 and the micrometer-registry-prometheus dependency to capture metrics. We use feign-reactor-webclient:3.2.6 to call out to another service. The metrics being generated by ... ... we are using reactive feign client (com.playtika.reactivefeign:feign-reactor-spring-cloud-starter:3.2.0) circuit breaker version : org.springframework.cloud:spring-cloud-starter-circuitbreaker-...
Top answer
1 of 2
1

Looks like you are trying to use feign-reactive (https://github.com/Playtika/feign-reactive) to implement your REST clients. I am also using it for one of my projects and it looks like this library does not have an out-of-the-box way to specify basic auth credentials. At least no way to do this declaratively. So I didn't find a better way to do this than to abandon the auto-configuration via @ReactiveFeignClient and start configuring reactive feign clients manually. This way you can manually add "Authorization" header to all outgoing requests. So, provided this client definition:

public interface FeingClient {

    @PostMapping("/api/students/special")
    public Flux<Student> getAllStudents(@RequestBody Flux<SubjectStudent> lista);

}

Add the following configuration class to your Spring context, replacing username, password and service-url with your own data:

@Configuration
public class FeignClientConfiguration {
    
    @Bean
    FeignClient feignClient() {
        WebReactiveFeign
            .<FeignClient>builder()
            .addRequestInterceptor(request -> {
                request.headers().put(
                    "Authorization", 
                     Collections.singletonList(
                        "Basic " + Base64.getEncoder().encodeToString( 
                            "username:password".getBytes(StandardCharsets.ISO_8859_1))));
                return request;
            })
            .target(FeignClient.class, "service-url");
    }
}

Note, that this API for manual configurftion of reactive feign clients can differ between different versions of the reactive-feign library. Also note that this approach has a major drawback - if you start creating beans for your feign clients manually you lose the main advantage of Feign - ability to write REST-clients declaratively with just a few lines of code. E.g. if you want to use the above client with some sort of client-side load-balancing mechanism, like Ribbon/Eureka or Ribbon/Kubernetes, you will also need to configure that manually.

2 of 2
1

You can use a direct interceptor:

@Configuration
class FeignClientConfiguration {
    @Bean
    fun reactiveHttpRequestInterceptor(): ReactiveHttpRequestInterceptor {
        return ReactiveHttpRequestInterceptor { request: ReactiveHttpRequest ->
            request.headers()["Authorization"] = //insert data from SecurityContextHolder;
            Mono.just(request)
        }
    }
}
🌐
DevGenius
blog.devgenius.io › how-to-build-high-performance-api-client-using-reactive-feign-bae4b5053d12
How to Build High Performance API Client Using Reactive Feign | by Gavin F. | Dev Genius
January 1, 2022 - How to Build High Performance API Client Using Reactive Feign A Definitive Guide to Reactive Feign — Client Options, Logging, Interceptor, Response Status, Retry Policy and Unit Testing Spring …