Re: [polymer-dev] using POST in core-xhr

49 views
Skip to first unread message

Rob Dodson

unread,
Feb 20, 2015, 5:00:45 PM2/20/15
to office...@gmail.com, polymer-dev
hm maybe try with core-ajax instead.

On Fri, Feb 20, 2015 at 3:45 AM, <office...@gmail.com> wrote:
I have been trying to find documentation on how to use POST method on core-xhr, sadly I have found none.
How do I send a POST request using core-xhr? currently the request works but no params are sent.

Polymer('posting-page',{
      submit: function() {
      var postReq = "post.php";
        this.$.xhr_post.request({url: postReq, method: "POST", header: "Content-type: application/x-www-form-urlencoded", body: '{"test": "hello world"}', callback: function(res){alert(res)}}); 
      }
    });

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 polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/943d7ce1-da4d-4619-bf48-57ba2d9304d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages