iron-ajax
iron-ajax copied to clipboard
Easily make ajax requests
When I use `` with `content-type="application/json"` (and `method="post"`) and then I do this: ```js this.$.xhr.body = "foo"; this.$.xhr.generateRequest(); ``` it just sends `foo` as the body of the request, but...
I am trying to bind local properties json and trying to create dynamic elements but the problem is I am not getting any console errors and not seeing json on...
This is also in reference to #235. This is a first pass at this PR as I have a number of questions about what form a more complete implementation should...
Setting iron-ajax's params property to a nested object in javascript: params = {foo: 'foo', bar: { baz: 1}}; The nested object doesn't get encoded in the query string: ?foo=foo&bar=%5Bobject%20Object%5D
See this SO question for more info: https://stackoverflow.com/questions/38018531/retrieving-status-code-from-ironrequest-promise Particularly the comment to the accepted answer: ``` This approach works only if the catch handler is in the same scope as...
This change adds the ability for listeners of "iron-ajax-error" to prevent "error" event. ajaxElement.addEventListener('iron-ajax-error', function (event) { event.preventDefault(); // now "error" will never fire. })
Issue described here: https://github.com/PolymerElements/iron-ajax/issues/45 and https://github.com/PolymerElements/iron-ajax/issues/63 PR with fix was merged: https://github.com/PolymerElements/iron-ajax/pull/126 But there is no fix for 2.0-preview and 2.0.0 versions. Issue is back...
When setting handle-as: 'xml', the response is correctly identified as XML but the xhr.responseType expects 'text' instead of 'xml' at [203](https://github.com/PolymerElements/iron-ajax/blob/master/iron-request.html#L203): ``` xhr.responseType = xhr._responseType = (options.handleAs || 'text'); ```...
### Description I'm using the component to make different async calls. It looks like using the given example it is not possible to send XHR Calls to different URL's after...
Every time i sent the ajax request to my API the server session changes. If try the same API in Postman it works fine. Any ideas what am i missing?