<div dir="ltr">Good decision!<div>Could I work on this issue? My JIRA account is &quot;<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">idelpivnitskiy</span>&quot;.</div><div><br></div><div>Thanks,</div><div>Idel</div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-30 9:01 GMT+03:00 Lukáš Fryč <span dir="ltr">&lt;<a href="mailto:lukas.fryc@gmail.com" target="_blank">lukas.fryc@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">We have discussed this a bit this morning at IRC,<br><br>and agreed to use 202 Accepted status code and empty JSON body {} (here we may later expose ID of the operation).<div><br></div><div>Additionally Java Sender lib should be changed to send Accept header &quot;application-json; text-plain&quot;, so that it keeps working with future and past versions.</div></div><br><div class="gmail_quote">st 29. 4. 2015 v 18:14 odesílatel Idel Pivnitskiy &lt;<a href="mailto:idel.pivnitskiy@gmail.com" target="_blank">idel.pivnitskiy@gmail.com</a>&gt; napsal:<div><div class="h5"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>It is a good remark! I noticed it when worked on REST api doc generation [1].<br></div><div>In my REST services I always use JSON or empty body and it looks like a pure api. <span style="font-size:12.8000001907349px">text/plain is not compatible with it. Think, that it will be better to fix it in later releases.</span></div><div><br></div><div>[1] <a href="https://github.com/aerogear/aerogear-unifiedpush-server/pull/526" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/pull/526</a></div><br>Best regards,<div>Idel Pivnitskiy</div></div><div dir="ltr">-- <div><div dir="ltr"><div dir="ltr"><div><div>E-mail: <a href="mailto:Idel.Pivnitskiy@gmail.com" target="_blank">Idel.Pivnitskiy@gmail.com</a></div></div><div>Twitter: <a href="https://twitter.com/idelpivnitskiy" target="_blank">@idelpivnitskiy</a></div><div>GitHub: <a href="https://github.com/idelpivnitskiy" target="_blank">@idelpivnitskiy</a></div></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-04-29 18:50 GMT+03:00 Lukáš Fryč <span dir="ltr">&lt;<a href="mailto:lukas.fryc@gmail.com" target="_blank">lukas.fryc@gmail.com</a>&gt;</span>:<br></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hey guys,<div><br></div><div>one issues Tadeas identified during testing sender endpoint via Java Sender lib is connected to this quiet change in the REST response from REST Sender endpoint (we added text/plain response specification):</div><div><br></div><div><a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/sender/PushNotificationSenderEndpoint.java#L107" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/sender/PushNotificationSenderEndpoint.java#L107</a><br></div><div><br></div><div><br></div><div>As we were always responding with &quot;Job submitted&quot;, admin-ui client started to complain about the response not being JSON. So obvious fix was change that to text/plain, right?</div><div><br></div><div>Not really.. some clients like Java Sender lib already expects application/json and JAX-RS then refuses these requests:</div><div><br></div><div><a href="https://github.com/aerogear/aerogear-unifiedpush-java-client/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/http/HttpClient.java#L82" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-java-client/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/http/HttpClient.java#L82</a><br></div><div><br></div><div><br></div><div><br></div><div>The question is, what should be the correct response?</div><div><br></div><div>There are many options, I would be perfectly fine with 204 No Content reply,</div><div><br></div><div>but JSON might be more appropriate for future extensions, we may want to return e.g. PushMessageInformation#id or something else as part of the response.</div><div><br></div><div>So, wouldn&#39;t be application/json more appropriate than text/plain? We may send empty body now {}.</div><div><br></div><div><br></div><div>Is this something we want to address for Alpha? Or should we release fixed Java Sender lib?</div><div><br></div><div><br></div><div>Cheers,</div><div><br></div><div>~ Lukas</div></div>
<br></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">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></div></div>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">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></blockquote></div></div></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 class="gmail_signature"><div dir="ltr"><div dir="ltr"><br></div></div></div>
</div></div>