camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Obarymski (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-12050) Camel Rest DSL returns 404 instead of 405, when http method is not supported
Date Wed, 29 Nov 2017 17:49:00 GMT
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)

Mime
View raw message