Examples for Spring Reactive with WebClient would be nice to have
See original GitHub issue@dsyer I was looking at the examples provided here: https://github.com/cloudevents/sdk-java/blob/master/examples/spring-reactive/src/test/java/io/cloudevents/examples/spring/DemoApplicationTests.java And it will be great to have the test using WebClient instead of TestRestTemplate, I couldn’t find any example showing how to send a CloudEvent (instead of returning a cloudevent) using WebClient which as far as I understand is the suggested client for reactive apps.
Looking at WebClient, I can’t do something like
HttpHeaders outgoing = CloudEventHttpUtils.toHttp(cloudEventBuilder.build());
webClient.post().headers(outgoing).body("").retrieve().bodyToMono(String.class);
As headers()
doesn’t take HttpHeaders. Which is kinda frustrating.
I might be missing something here… so any pointer is highly appreciated.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Spring 5 WebClient - Baeldung
In this tutorial, we're going to examine WebClient, which is a reactive web client introduced in Spring 5. We're also going to look...
Read more >Spring WebClient (with Examples) - HowToDoInJava
Learn to use configure and use Spring WebClient (non-blocking and reactive) to perform HTTP requests, timeouts, and response handling.
Read more >Sending HTTP requests with Spring WebClient - Reflectoring
In Spring 5, Spring gained a reactive web framework: Spring WebFlux. This is designed to co-exist alongside the existing Spring Web MVC APIs ......
Read more >Reactive Programming with SpringWebFlux-WebClient
Spring Webflux is a fully non-blocking web framework that fully centers around reactive programming. Spring Weblfux archives this by using Project Reactor that ......
Read more >Spring 5 WebClient and WebTestClient Tutorial with Examples
WebClient is a non-blocking, reactive HTTP client with a fluent functional style API. It is part of Spring WebFlux module that was ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe so.
See #418