Supporting PUT correctly is important because PUT requests are supposed to 
be idempotent 
(http://stackoverflow.com/questions/630453/put-vs-post-in-rest).

However, Polymer seems to have a few bugs for PUT requests. In particular, 
the body is completely being dropped when the method is set to PUT. Here 
are my suggested fixes:

polymer-ajax.html, line 235 should be:

        if (this.method === 'POST' *|| this.method === 'PUT'*) {
          args.body = this.body || args.body;
        }

polymer-xhr.html, line 88 should be:

        xhr.send((method == 'POST'* || method == 'PUT'*) ? (options.body || 
params) : null);

My additions in *bold*.

Please take address this issue!

Thanks,

-- Nic


Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/e32f38fc-9ea1-4324-9f06-603aacab68f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to