You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by swissSteve <st...@gmail.com> on 2015/06/17 16:05:44 UTC
Rest DSL URI template wildcards?
Hi, I'm using the Java DSL to define a REST endpoint and I have a use case
where I'd like to specify a wildcard for the verb URI template i.e ..*:
rest("/api/now/v1/").description("APIProxy").bindingMode(RestBindingMode.off).produces("application/xml")
.get("..*").to("direct:invokeApi")
Can this be done?
I'm using Camel 2.14.2 with camel-jetty under Karaf 3.0.3.
--
Steve
--
View this message in context: http://camel.465427.n5.nabble.com/Rest-DSL-URI-template-wildcards-tp5768332.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Rest DSL URI template wildcards?
Posted by swissSteve <st...@gmail.com>.
Brilliant, just what I need. Thanks Claus!
--
View this message in context: http://camel.465427.n5.nabble.com/Rest-DSL-URI-template-wildcards-tp5768332p5768336.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Rest DSL URI template wildcards?
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
No well it depends on what underlying component you use.
If you use camel-spark-java then it support * as wildcard.
For jetty you can likely set its component / endpoint option
matchOnUriPrefix=true which is its "weird name" for wildcard.
But the * in the get is not understood by jetty.
Though we could maybe try to bake that in officially in the rest-dsl.
On Wed, Jun 17, 2015 at 4:05 PM, swissSteve <st...@gmail.com> wrote:
> Hi, I'm using the Java DSL to define a REST endpoint and I have a use case
> where I'd like to specify a wildcard for the verb URI template i.e ..*:
>
> rest("/api/now/v1/").description("APIProxy").bindingMode(RestBindingMode.off).produces("application/xml")
> .get("..*").to("direct:invokeApi")
>
> Can this be done?
> I'm using Camel 2.14.2 with camel-jetty under Karaf 3.0.3.
>
> --
> Steve
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Rest-DSL-URI-template-wildcards-tp5768332.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@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/