@@ -6,10 +6,9 @@ import XMLHttpRequestEventTarget from './XMLHttpRequestEventTarget.js';
66import Log from '../utils/log.js' ;
77import Blob from './Blob.js' ;
88import ProgressEvent from './ProgressEvent.js' ;
9- import URIUtil from ' ../utils/uri' ;
10- import { NativeModules } from "react-native " ;
9+ import URIUtil from " ../utils/uri" ;
10+ import { config } from "../fetch " ;
1111
12- const ReactNativeBlobUtil = NativeModules . ReactNativeBlobUtil ;
1312const log = new Log ( 'XMLHttpRequest' ) ;
1413
1514
@@ -183,7 +182,7 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget {
183182 } ;
184183 }
185184 log . debug ( 'body created send request' ) ;
186- body = ReactNativeBlobUtil . wrap ( blob . getReactNativeBlobUtilRef ( ) ) ;
185+ body = URIUtil . wrap ( blob . getReactNativeBlobUtilRef ( ) ) ;
187186 resolve ( ) ;
188187 } ) ;
189188 } ) ;
@@ -203,13 +202,12 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget {
203202 _headers [ h ] = _headers [ h ] . toString ( ) ;
204203 }
205204
206- this . _task = ReactNativeBlobUtil
207- . config ( {
208- auto : true ,
209- timeout : this . _timeout ,
210- increment : this . _increment ,
211- binaryContentTypes : XMLHttpRequest . binaryContentTypes
212- } )
205+ this . _task = config ( {
206+ auto : true ,
207+ timeout : this . _timeout ,
208+ increment : this . _increment ,
209+ binaryContentTypes : XMLHttpRequest . binaryContentTypes
210+ } )
213211 . fetch ( _method , _url , _headers , body ) ;
214212 this . _task
215213 . stateChange ( this . _headerReceived )
0 commit comments