You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jacek Obarymski (JIRA)" <ji...@apache.org> on 2017/11/29 17:49:00 UTC

[jira] [Created] (CAMEL-12050) Camel Rest DSL returns 404 instead of 405, when http method is not supported

Jacek Obarymski created CAMEL-12050:
---------------------------------------

             Summary: Camel Rest DSL returns 404 instead of 405, when http method is not supported
                 Key: CAMEL-12050
                 URL: https://issues.apache.org/jira/browse/CAMEL-12050
             Project: Camel
          Issue Type: Bug
          Components: camel-core, camel-servlet
    Affects Versions: 2.20.1
            Reporter: Jacek Obarymski


Hi,

I have a REST resource  with a GET method, defined using Rest DSL (and _servlet_ component) and it works well, returning 200 response. But when I send a PUT request (which is not yet implemented) it returns 404 (not found) which can confusing at times. It should rather return 405 (method not allowed) instead.

{{
        restConfiguration()
                .component("servlet")
                .bindingMode(json)
                .dataFormatProperty("prettyPrint", "true");

         rest("my-resource-url-here")
                .get()
                .consumes("application/json")
                .produces("application/json")
                .type(MyRequestClass.class)
                .to("...")
}}





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)