Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send and reSend problem #277

Open
1 of 8 tasks
terrak opened this issue Jun 15, 2017 · 1 comment
Open
1 of 8 tasks

Send and reSend problem #277

terrak opened this issue Jun 15, 2017 · 1 comment

Comments

@terrak
Copy link

terrak commented Jun 15, 2017

Description

I use one iron-request component to send different requests to php for editing MariaDb database.

The problème I have is if I send a request, I cannot reuse the same xhr, cause is readyState is at 4 (which mean Done)

I have a suggestion for a correction for the send command :


    send: function(options) {
      var xhr = this.xhr;

      if (xhr.readyState > 0 && xhr.readyState != 4 /* DONE */ ) {
        return null;
      }



(adding

&& xhr.readyState != 4 /* DONE */

works for me)

Expected outcome

Using multiple time in a componnent the same xhr.

Actual outcome

Can only use one time the xhr componnent

Live Demo

Steps to reproduce

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
@mrherndon
Copy link

mrherndon commented Jul 21, 2017

I came here for this exact reason. It was driving me nuts and I didn't know what I was doing wrong.

It looks like iron-ajax is dynamically creating a new iron-request for every new send.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants