Skip to content

Commit 40bfe13

Browse files
committed
- consider xhr status code as success if it is 201 or 202
- upgrade dependencies - bump version
1 parent 52faea3 commit 40bfe13

File tree

6 files changed

+5227
-1512
lines changed

6 files changed

+5227
-1512
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Logs
22

3+
## v3.0.6
4+
5+
- consider xhr status code as success if it is 201 or 202
6+
7+
38
## v3.0.5
49

510
- add `credentials` default value `same-origin` in fetch api

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@
233233
ref$ = xhrpar(url, o, opt), u = ref$.u, c = ref$.c;
234234
x = new XMLHttpRequest();
235235
x.onreadystatechange = function(){
236-
var ret, e;
236+
var ref$, ret, e;
237237
if (x.readyState === XMLHttpRequest.DONE) {
238-
if (x.status === 200) {
238+
if ((ref$ = x.status) === 200 || ref$ === 201 || ref$ === 202) {
239239
try {
240240
ret = opt.type === 'json'
241241
? JSON.parse(x.responseText)

dist/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)