[aerogear-dev] Controller consumes - defaults... / settings

Matthias Wessendorf matzew at apache.org
Thu Mar 28 06:36:29 EDT 2013


On Thu, Mar 28, 2013 at 11:28 AM, Bruno Oliveira <bruno at abstractj.org> wrote:
> Maybe make use of custom media types on controller?
> https://github.com/aerogear/aerogear-controller-demo/blob/master/src/main/java/org/jboss/aerogear/controller/demo/config/CustomMediaTypeResponder.java

could be one option

> to render JSON as "plain text"?

would be another option

>
> Or gently open a feature request to include it on controller :)
>
> About it be convenient…well..it's a matter of taste. cURL never lies :)

sure - but again some folks tend to quickly test a URL in the browser
(e.g. from Chrome Dev Tools, click on URL (open in new tab)), and
receiving a 404 is a bit odd - at least I feel it that way :)

>
>
> --
> "The measure of a man is what he does with power" - Plato
> -
> @abstractj
> -
> Volenti Nihil Difficile
>
> On Thursday, March 28, 2013 at 7:03 AM, Matthias Wessendorf wrote:
>
> Using the browser to directly access (GET) endpoints is usally (at
> least for me) a very convenient way to quickly check things.
> With the controller, when the RESTFul endpoint is configured to
> consume "JSON", a URL like this (in the browser)
>
> http://localhost:8080/scaffoldtester/customers
>
> returns 404
>
>
> However, with curl (curl -v -H "Accept: application/json" -H
> "Content-type: application/json" -X GET
> http://localhost:8080/scaffoldtester/customers/)
> It works since we explicitly specifiy the application/json
>
> I wonder.... if there could be a nicer way, to allow JSON, and the
> TEXT/HTML - without adding more concumes() ?
>
> Not sure - just a thought ...
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf



More information about the aerogear-dev mailing list