apache / apache/camel-quarkus

Camel rest returns 404 status code instead of 405

Open
#4,269 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
302
Forks
232
Avg merge
1d 20h
Merged PRs (30d)
114

Description

When I define an endpoint with Camel:
```
rest().get("/hello").to("direct:hello");
from("direct:hello").setBody(constant("Hello World"));
```
request with GET method to `/hello` returns 200 status code
and request with POST method to `/hello` returns 405 status code.
This is expected behaviour.

Once I add an endpoint with Quarkus:
```
@Path("/bye")
public class QuarkusEndpoint {
@GET
public String bye() {
return "Bye World";
}
}
```
request with POST method to `/hello` doesn't return 405 status code anymore but 404.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the behavior using the Camel REST `/hello` route and the Quarkus `@Path("/bye")` endpoint shown in the issue. Start by comparing the POST responses with and without the Quarkus endpoint; done means an unsupported POST request returns HTTP 405 rather than 404.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.