Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 273f8ee

Browse files
committed
Fix Fetch.bodyUsed state #70
1 parent 43ecccc commit 273f8ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/polyfill/Fetch.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,25 @@ class RNFetchBlobFetchRepsonse {
101101

102102
arrayBuffer(){
103103
log.verbose('to arrayBuffer', this.rnfbRespInfo)
104+
this.bodyUsed = true
104105
return readArrayBuffer(this.rnfbResp, this.rnfbRespInfo)
105106
}
106107

107108
text() {
108109
log.verbose('to text', this.rnfbResp, this.rnfbRespInfo)
110+
this.bodyUsed = true
109111
return readText(this.rnfbResp, this.rnfbRespInfo)
110112
}
111113

112114
json() {
113115
log.verbose('to json', this.rnfbResp, this.rnfbRespInfo)
116+
this.bodyUsed = true
114117
return readJSON(this.rnfbResp, this.rnfbRespInfo)
115118
}
116119

117120
blob() {
118121
log.verbose('to blob', this.rnfbResp, this.rnfbRespInfo)
122+
this.bodyUsed = true
119123
return readBlob(this.rnfbResp, this.rnfbRespInfo)
120124
}
121125
}

0 commit comments

Comments
 (0)