question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dsyercommented, Nov 17, 2021

I believe so.

1reaction
dsyercommented, Sep 27, 2021

See #418

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found