[
https://issues.apache.org/jira/browse/CAMEL-13950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16924051#comment-16924051
]
Luca Burgazzoli commented on CAMEL-13950:
-----------------------------------------
In my mind it is just about consistency and btw, I'm just ok to use rest(), but
as today we can basically do routing directly from the rest dsl:
{code:java}
rest()
.get("").to(...)
.post("").route().to("")
{code}
but with the introduction of the endpointdsl we have discrepancies as I cannot
do something like
{code:java}
timer("test")
.route().to("")
{code}
And I cannot use the result of the rest() method as endpoint so I'm striving to
find out if there is a way to improve what we have in order to provide a
consistent user experience.
But it is not as simple as I initially tough :)
> better endpointdsl for rest
> ---------------------------
>
> Key: CAMEL-13950
> URL: https://issues.apache.org/jira/browse/CAMEL-13950
> Project: Camel
> Issue Type: Improvement
> Components: rest
> Reporter: Luca Burgazzoli
> Priority: Minor
>
> We should have a better "fluent dsl" for rest services, as today we have
> something like
> {code:java}
> rest("/v1").get("/api").to(""...)
> {code}
> It would be nice to simplify this by having an option to start from the
> method like:
> {code:java}
> get("/api")
> .accept("...")
> .to("...")
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)