Hi

What http component do you use? servlet / jetty / or something else?
And what version of Camel.

There is a few tickets about rest-dsl and CORS issues still to get
fixed / improved.

On Thu, Apr 23, 2015 at 10:18 AM, Ted <na...@pritchard.uk.net> wrote:
> Hi,
>
> I have a simple REST DSL route that has both a GET and a PUT for a
> particular resource:
>
>         rest("/orders")
>                 .get("/{orderId}").outType(Order.class)
>                         .to("direct:getOrder")
>                 .put("/{orderId}").type(Order.class)
>                         .to("direct:updateOrder");
>
>
> This application is run on a different port to the consuming application so
> I have enabled CORS via a servlet filter (I also tried the enable CORS
> option on the configuration of REST DSL).  The consuming application is
> sending a pre-flight HTTP OPTIONS request.  I can see in the class
> ServletRestServletResolveConsumerStrategy that the method
> matchRestMethod(method, restrict) has special provision for the OPTIONS
> method.  The problem for me seems to be that if the consuming application
> sends a method similar to:
>
> /orders/1 OPTIONS
>
> Then the ServletRestServletResolveConsumerStrategy class is not able to find
> a unique match because both the GET and the PUT methods are matched and the
> consumer sees a 404.
>
> Is there something I'm missing?
>
> Ted
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/HTTP-OPTIONS-tp5766194.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to