[ 
https://issues.apache.org/jira/browse/CAMEL-12050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-12050:
--------------------------------
    Fix Version/s: 2.21.0

> 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: Improvement
>          Components: camel-core, camel-servlet
>    Affects Versions: 2.20.1
>            Reporter: Jacek Obarymski
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.21.0
>
>
> 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.
> {quote}     
>          restConfiguration()
>                  .component("servlet")
>                  .bindingMode(json)
>                  .dataFormatProperty("prettyPrint", "true");
>  
>           rest("my-resource-url-here")
>                  .get()
>                  .consumes("application/json")
>                  .produces("application/json")
>                  .type(MyRequestClass.class)
>                  .to("...")
> {quote}



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

Reply via email to