|
@@ -10,8 +10,8 @@ import ProgressEvent from './ProgressEvent.js'
|
10
|
10
|
|
11
|
11
|
const log = new Log('XMLHttpRequest')
|
12
|
12
|
|
13
|
|
-// log.disable()
|
14
|
|
-log.level(3)
|
|
13
|
+log.disable()
|
|
14
|
+// log.level(2)
|
15
|
15
|
|
16
|
16
|
const UNSENT = 0
|
17
|
17
|
const OPENED = 1
|
|
@@ -246,7 +246,6 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget{
|
246
|
246
|
for(let i in respHeaders) {
|
247
|
247
|
result += `${i}: ${respHeaders[i]}${String.fromCharCode(0x0D,0x0A)}`
|
248
|
248
|
}
|
249
|
|
- console.log('###', result.substr(0, result.length-2))
|
250
|
249
|
return result.substr(0, result.length-2)
|
251
|
250
|
}
|
252
|
251
|
|
|
@@ -315,6 +314,7 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget{
|
315
|
314
|
}
|
316
|
315
|
if(resp) {
|
317
|
316
|
let info = resp.respInfo || {}
|
|
317
|
+ log.debug(this._url, info, info.respType)
|
318
|
318
|
switch(info.respType) {
|
319
|
319
|
case 'json' :
|
320
|
320
|
try{
|
|
@@ -348,7 +348,7 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget{
|
348
|
348
|
}
|
349
|
349
|
|
350
|
350
|
set onreadystatechange(fn:() => void) {
|
351
|
|
- log.verbose('XMLHttpRequest set onreadystatechange', fn.toString())
|
|
351
|
+ log.verbose('XMLHttpRequest set onreadystatechange', fn)
|
352
|
352
|
this._onreadystatechange = fn
|
353
|
353
|
}
|
354
|
354
|
|