PolymerElements / iron-ajax

Easily make ajax requests
https://www.webcomponents.org/element/PolymerElements/iron-ajax
127 stars 113 forks source link

Iron-ajax does two calls for service #309

Open Ankita-G-Mudgal opened 6 years ago

Ankita-G-Mudgal commented 6 years ago

Description

I can see two calls in network tab of dev tools using iron-ajax. If I remove the headers attribute from iron-ajax than I can only see single call in network tab.

Expected outcome

iron-ajax should call the service api only once instead of twice image

Actual outcome

image

Steps to reproduce

  1. Put iron-ajax element in a page for GET method
  2. Set the auto attribute (optional) It can be triggered through javascript also using generateRequest() method
  3. Now set the url attribute as
  4. Open it in a web browser and open dev tools
  5. In network tab tab you will see two calls for it one with response and other as a dummy call.

Browsers Affected