<div dir="ltr">Hi Corinne,<div style>On a route you can set different consumers ( <a href="http://aerogear.org/docs/guides/aerogear-controller/mediatypes.html">http://aerogear.org/docs/guides/aerogear-controller/mediatypes.html</a> ) , I&#39;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 :</div>
<div style><br></div><div style>curl -v -b cookies.txt -c cookies.txt -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json; charset=utf-8&quot; -X POST -d &#39;{&quot;loginName&quot;: &quot;john&quot;, &quot;password&quot;:&quot;123&quot;}&#39; <a href="http://localhost:8080/prodoctor/login">http://localhost:8080/prodoctor/login</a><br>
</div><div style><br></div><div style>Update the repo and give it a try ! </div><div style><br></div><div style>Seb</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 17, 2013 at 10:47 PM, Corinne Krych <span dir="ltr">&lt;<a href="mailto:corinnekrych@gmail.com" target="_blank">corinnekrych@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">







<p>Hello Guys</p><p>Writing code for ProDoctor demo, on client side, I&#39;m using Xcode template for AGPush which is based on AFNetworking 121</p><p>When doing my login request in iOS I bumped into the issue of having content type set to &quot;application/json; charset=utf-8&quot; whereas on routes (backend) only &quot;application/json&quot; is set which causes this exception:</p>

<p>[application/json].&#39;: java.lang.RuntimeException: AG_CONTROLLER000012: No Consumer found for Parameter: &#39;Parameter[type=ENTITY, type=class org.aerogear.prodoctor.model.SaleAgent]&#39;. The registered Consumers were: &#39;[JsonConsumer[mediaType=application/json]]&#39;. Please add a Consumer for one the media types supported by the route: [application/json].</p>

<p><span style="white-space:pre-wrap">        </span>at org.jboss.aerogear.controller.util.ParameterExtractor.getConsumer(ParameterExtractor.java:152) [aerogear-controller-1.0.1.jar:1.0.1]</p><p><span style="white-space:pre-wrap">        </span>at org.jboss.aerogear.controller.util.ParameterExtractor.extractArguments(ParameterExtractor.java:70) [aerogear-controller-1.0.1.jar:1.0.1]</p>

<p><br></p><p>I think we should support both  &quot;application/json; charset=utf-8&quot; and  &quot;application/json&quot;. /shall we open a JIRA on AeroGear Controller to support both?</p><p><br>
</p><p>wdyt?</p><span class="HOEnZb"><font color="#888888"><p><br></p><p>Corinne</p><p><br></p></font></span></div>
<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>