|
@@ -123,6 +123,8 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget{
|
123
|
123
|
else if(typeof body === 'object') {
|
124
|
124
|
body = JSON.stringify(body)
|
125
|
125
|
}
|
|
126
|
+ else
|
|
127
|
+ body = body.toString()
|
126
|
128
|
|
127
|
129
|
this._task = RNFetchBlob
|
128
|
130
|
.config({ auto: true, timeout : this._timeout })
|
|
@@ -208,8 +210,6 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget{
|
208
|
210
|
_headerReceived(e) {
|
209
|
211
|
log.verbose('header received ', this._task.taskId, e)
|
210
|
212
|
this.responseURL = this._url
|
211
|
|
- this.upload.dispatchEvent('loadend')
|
212
|
|
- this.dispatchEvent('load')
|
213
|
213
|
if(e.state === "2") {
|
214
|
214
|
this._responseHeaders = e.headers
|
215
|
215
|
this._statusText = e.status
|
|
@@ -282,6 +282,7 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget{
|
282
|
282
|
break;
|
283
|
283
|
}
|
284
|
284
|
this.dispatchEvent('loadend')
|
|
285
|
+ this.dispatchEvent('load')
|
285
|
286
|
this._dispatchReadStateChange(XMLHttpRequest.DONE)
|
286
|
287
|
}
|
287
|
288
|
this.clearEventListeners()
|