[aerogear-dev] "application/json; charset=utf-8" not supported

Daniel Bevenius daniel.bevenius at gmail.com
Tue Jun 18 00:14:50 EDT 2013


Hi,

this sounds like a bug that we found a while back:
https://issues.jboss.org/browse/AEROGEAR-1085

Perhaps you could try the staged version 1.0.1 that Bruno deployed
yesterday:
https://repository.jboss.org/nexus/content/repositories/jboss_releases_staging_profile-1085/

/Dan


On 18 June 2013 00:56, Sebastien Blanc <scm.blanc at gmail.com> wrote:

> Hi Corinne,
> On a route you can set different consumers (
> http://aerogear.org/docs/guides/aerogear-controller/mediatypes.html ) ,
> I've updated the Route on Prodoctor and now it seems to work. I can not
> reproduce your ios example here on my fedora box but this curl works now :
>
> curl -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H
> "Content-type: application/json; charset=utf-8" -X POST -d '{"loginName":
> "john", "password":"123"}' http://localhost:8080/prodoctor/login
>
> Update the repo and give it a try !
>
> Seb
>
>
>
> On Mon, Jun 17, 2013 at 10:47 PM, Corinne Krych <corinnekrych at gmail.com>wrote:
>
>> Hello Guys
>>
>> Writing code for ProDoctor demo, on client side, I'm using Xcode template
>> for AGPush which is based on AFNetworking 121
>>
>> When doing my login request in iOS I bumped into the issue of having
>> content type set to "application/json; charset=utf-8" whereas on routes
>> (backend) only "application/json" is set which causes this exception:
>>
>> [application/json].': java.lang.RuntimeException: AG_CONTROLLER000012: No
>> Consumer found for Parameter: 'Parameter[type=ENTITY, type=class
>> org.aerogear.prodoctor.model.SaleAgent]'. The registered Consumers were:
>> '[JsonConsumer[mediaType=application/json]]'. Please add a Consumer for one
>> the media types supported by the route: [application/json].
>>
>> at
>> org.jboss.aerogear.controller.util.ParameterExtractor.getConsumer(ParameterExtractor.java:152)
>> [aerogear-controller-1.0.1.jar:1.0.1]
>>
>> at
>> org.jboss.aerogear.controller.util.ParameterExtractor.extractArguments(ParameterExtractor.java:70)
>> [aerogear-controller-1.0.1.jar:1.0.1]
>>
>>
>> I think we should support both  "application/json; charset=utf-8" and
>>  "application/json". /shall we open a JIRA on AeroGear Controller to
>> support both?
>>
>>
>> wdyt?
>>
>>
>> Corinne
>>
>>
>>
>> _______________________________________________
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130618/9ce56d6a/attachment.html 


More information about the aerogear-dev mailing list