()
| 90 | xhr.send(body); |
| 91 | |
| 92 | function onreadystatechange() { |
| 93 | const { readyState, status } = xhr; |
| 94 | |
| 95 | if (readyState === 2) { |
| 96 | if (status >= 200 && status < 300) { |
| 97 | xhr.responseType = responseType; |
| 98 | } else { |
| 99 | xhr.responseType = "text"; |
| 100 | } |
| 101 | } else if (readyState === 4) { |
| 102 | if (status >= 200 && status < 300) { |
| 103 | const res = ajax.response(xhr); |
| 104 | onsuccess(res); |
| 105 | resolve(res); |
| 106 | } else { |
| 107 | handleError(); |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | function progress(e) { |
| 113 | const { loaded, total } = e; |
nothing calls this directly
no test coverage detected