camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-12050) Camel Rest DSL returns 404 instead of 405, when http method is not supported
Date Thu, 11 Jan 2018 18:30:00 GMT

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

Claus Ibsen resolved CAMEL-12050.
---------------------------------
    Resolution: Fixed

> 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)

Mime
View raw message