[aerogear-dev] USP 1.1.0 - API change: Status code change for Sender Endpoint
Lucas Holmquist
lholmqui at redhat.com
Wed Feb 4 08:15:58 EST 2015
> On Feb 3, 2015, at 5:27 PM, Matthias Wessendorf <matzew at apache.org> wrote:
>
>
>
> On Tue, Feb 3, 2015 at 10:57 PM, Sébastien Blanc <scm.blanc at gmail.com <mailto:scm.blanc at gmail.com>> wrote:
> Agreed but we should make that clear in the clients (Java and Node) when receiving the response (I'm thinking about the callbacks) , that said, an javadoc/comment should de enough.
>
> Luckily they say nothing about the actual status code:
> * https://aerogear.org/docs/specs/aerogear-unifiedpush-java-client/org/jboss/aerogear/unifiedpush/message/MessageResponseCallback.html#onComplete(int) <https://aerogear.org/docs/specs/aerogear-unifiedpush-java-client/org/jboss/aerogear/unifiedpush/message/MessageResponseCallback.html#onComplete(int)>
> * https://aerogear.org/docs/specs/aerogear-unifiedpush-nodejs-client/ <https://aerogear.org/docs/specs/aerogear-unifiedpush-nodejs-client/>
yea, i always thought this was a fire and forget thing anyway
>
> On JavaDoc, it just says "statusCode - the status code as returned by the server."
>
> => Nothing to change.
>
> More important is to update this:
> https://aerogear.org/docs/specs/aerogear-unifiedpush-rest/sender/index.html#POST <https://aerogear.org/docs/specs/aerogear-unifiedpush-rest/sender/index.html#POST>
>
> But that's covered with the JavaDoc update, required for the change from 200 -> 202
>
> -Matthias
>
>
>
> Envoyé de mon iPhone
>
> Le 3 févr. 2015 à 22:13, Matthias Wessendorf <matzew at apache.org <mailto:matzew at apache.org>> a écrit :
>
>> Hi,
>>
>> I recently noticed that we are (IMO) incorrectly returning 200 (OK):
>> https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/sender/PushNotificationSenderEndpoint.java#L112-L113 <https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/sender/PushNotificationSenderEndpoint.java#L112-L113>
>>
>> Since we really do submit an async job here, and its processing may not have been started when we do return the 200 (OK), I'd like to propose a slight change here to instead use 202 (Accepted):
>>
>> http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.3 <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.3>
>>
>> If the team is OK (ha ha) with this, I will track this in JIRA
>>
>> -Matthias
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/ <http://matthiaswessendorf.wordpress.com/>
>> sessions: http://www.slideshare.net/mwessendorf <http://www.slideshare.net/mwessendorf>
>> twitter: http://twitter.com/mwessendorf <http://twitter.com/mwessendorf>_______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev at lists.jboss.org <mailto:aerogear-dev at lists.jboss.org>
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev <https://lists.jboss.org/mailman/listinfo/aerogear-dev>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org <mailto:aerogear-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/aerogear-dev <https://lists.jboss.org/mailman/listinfo/aerogear-dev>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/ <http://matthiaswessendorf.wordpress.com/>
> sessions: http://www.slideshare.net/mwessendorf <http://www.slideshare.net/mwessendorf>
> twitter: http://twitter.com/mwessendorf <http://twitter.com/mwessendorf>_______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org <mailto:aerogear-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/aerogear-dev <https://lists.jboss.org/mailman/listinfo/aerogear-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20150204/28b53dff/attachment.html
More information about the aerogear-dev
mailing list