<div dir="ltr">This works fine (see: no payload):<div>curl -3 -v -b cookies.txt -c cookies.txt -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; -X DELETE <a href="https://https-pushee.rhcloud.com/rest/applications/e952017a-9d6c-4716-8802-235ed6178fd6">https://https-pushee.rhcloud.com/rest/applications/e952017a-9d6c-4716-8802-235ed6178fd6</a><br>
</div><div><br></div><div><br></div><div>Here I do get a 415:</div><div>curl -3 -v -b cookies.txt -c cookies.txt -v -H &quot;Accept: application/json&quot; -X DELETE <a href="https://https-pushee.rhcloud.com/rest/applications/e952017a-9d6c-4716-8802-235ed6178fd6">https://https-pushee.rhcloud.com/rest/applications/e952017a-9d6c-4716-8802-235ed6178fd6</a><br>
</div><div><br></div><div><br></div><div>Let&#39;s fix that for the next iteration</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 15, 2013 at 4:17 PM, Karel Piwko <span dir="ltr">&lt;<a href="mailto:kpiwko@redhat.com" target="_blank">kpiwko@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes, there should be no payload, hence no Content-Type header for DELETE. Some<br>
clients ignore Content-Type if they construct DELETE requests, which is<br>
apparently not curl case.<br>
<br>
I&#39;ve updated the JIRA with more details. The endpoint I&#39;m speaking about<br>
is /rest/applications/${pushAppId}, but most of @DELETE endpoints are affected<br>
by requiring content type or content type and payload.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Thu, 15 Aug 2013 09:04:00 -0500<br>
Kris Borchers &lt;<a href="mailto:kris@redhat.com">kris@redhat.com</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt; On Aug 15, 2013, at 9:01 AM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org">matzew@apache.org</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Kris - I guess this is the &#39;problem&#39;:<br>
&gt; &gt;<br>
&gt; &gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/iOSVariantEndpoint.java#L193" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/iOSVariantEndpoint.java#L193</a><br>

&gt; &gt;<br>
&gt; &gt; I always did CURL DELETE, but I NEVER gave payload with it .... but.......<br>
&gt; &gt; (my bad?) I did always include this:<br>
&gt; &gt;<br>
&gt; &gt; curl -v -b cookies.txt -c cookies.txt -v -H &quot;Accept: application/json&quot; -H<br>
&gt; &gt; &quot;Content-type: application/json&quot;  -X DELETE<br>
&gt;<br>
&gt; Oh, yeah if you&#39;re referring to the Content-type that should not be required<br>
&gt; for DELETE<br>
&gt; &gt; .........<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Thu, Aug 15, 2013 at 3:59 PM, Kris Borchers &lt;<a href="mailto:kris@redhat.com">kris@redhat.com</a>&gt; wrote:<br>
&gt; &gt; Yeah, I assumed this was an actual problem but don&#39;t see any reference to<br>
&gt; &gt; our spec or code where we require a body for DELETE. Karel, can you add<br>
&gt; &gt; that to the JIRA or at least clarify what actual issue you have run into?<br>
&gt; &gt;<br>
&gt; &gt; On Aug 15, 2013, at 8:54 AM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org">matzew@apache.org</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt; Hello,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; We have &quot;@Delete APIs&quot; that are used by the devices/client (for<br>
&gt; &gt;&gt; unregistrations), but that does not require any data: ==&gt;<br>
&gt; &gt;&gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/installations/InstallationRegistrationEndpoint.java#L117-L122" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/installations/InstallationRegistrationEndpoint.java#L117-L122</a><br>

&gt; &gt;&gt; It only reads the /token from the URL and the headers (for basic)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; We have other endpoints that are used by the AdminUI, e.g.<br>
&gt; &gt;&gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/iOSVariantEndpoint.java#L190-L203" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/iOSVariantEndpoint.java#L190-L203</a><br>

&gt; &gt;&gt; That also really just reads out of the URL .<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I also don&#39;t see where the spec, e.g.:<br>
&gt; &gt;&gt; <a href="http://staging.aerogear.org/docs/specs/aerogear-push-rest/PushApplication/" target="_blank">http://staging.aerogear.org/docs/specs/aerogear-push-rest/PushApplication/</a><br>
&gt; &gt;&gt; talk about JSON payload required<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; -Matthias<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; On Thu, Aug 15, 2013 at 3:35 PM, Karel Piwko &lt;<a href="mailto:kpiwko@redhat.com">kpiwko@redhat.com</a>&gt; wrote:<br>
&gt; &gt;&gt; Hi All,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I think that DELETE requests in Push Server do not conform to HTTP/REST<br>
&gt; &gt;&gt; specifications because they require request body. More details here:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; <a href="https://issues.jboss.org/browse/AGPUSH-298" target="_blank">https://issues.jboss.org/browse/AGPUSH-298</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Should we change them in 0.8.0 release?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Thanks,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Karel<br>
&gt; &gt;&gt; _______________________________________________<br>
&gt; &gt;&gt; aerogear-dev mailing list<br>
&gt; &gt;&gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; Matthias Wessendorf<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
&gt; &gt;&gt; sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
&gt; &gt;&gt; twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
&gt; &gt;&gt; _______________________________________________<br>
&gt; &gt;&gt; aerogear-dev mailing list<br>
&gt; &gt;&gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; aerogear-dev mailing list<br>
&gt; &gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Matthias Wessendorf<br>
&gt; &gt;<br>
&gt; &gt; blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
&gt; &gt; sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
&gt; &gt; twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; aerogear-dev mailing list<br>
&gt; &gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt;<br>
<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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div>