<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">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">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>