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.

Allow handling of HTTP CONNECT in WebFlux

See original GitHub issue

I’m trying to simulate an CONNECT HTTP request using MockServerHttpRequest, but it only receives HttpMethod as valid methods (not strings). For some reason CONNECT isn’t in the HttpMethod enum. I don’t mind creating a PR for that, just want to make sure it’s not intentional.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
rstoyanchevcommented, May 19, 2020

Yes allowing a custom HTTP method on MockServerHttpRequest is generally useful. Please open a more focused issue for that and we’ll get it done.

but I still find it weird that currently if WebFlux receives a CONNECT method it’s just parsed completely wrong (the path parameter is broken)

I was not able to reproduce this part. I did experiment with adding CONNECT to HttpMethod and RequestMethod I was able to successfully invoke a controller method. Depending on what the issue is we could fix it but for that I would need some sample.

1reaction
sbrannencommented, May 19, 2020

@GuyLewin, would you mind opening a new issue to request the custom HTTP method support in MockServerHttpRequest?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web on Reactive Stack - Spring
In Spring WebFlux, view resolution is supported through a dedicated HandlerResultHandler that uses ViewResolver instances to map a String ( ...
Read more >
Sending HTTP requests with Spring WebClient - Reflectoring
In this article we've looked at everything you need to get started using Spring WebClient . WebFlux and WebClient are mature powerful APIs...
Read more >
Handling Errors in Spring WebFlux - Baeldung
In this tutorial, we'll look at various strategies available for handling errors in a Spring WebFlux project while walking through a ...
Read more >
How to handle HTTP OPTIONS requests in Spring Boot 2 with ...
Explicit OPTIONS handling as suggested above not required, but do remember the OPTIONS request will need to include Origin and Access-Control- ...
Read more >
Reactive Spring Security For WebFlux REST Web Services - II
No HTTP Basic Authentication ... The above sample configures both basic and form authentication. Let's remove the basic one — form authentication should...
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