|
@@ -27,7 +27,7 @@ let prefix = ((Platform.OS === 'android') ? 'file://' : '')
|
27
|
27
|
describe('GET request with params', (report, done) => {
|
28
|
28
|
let time = Date.now()
|
29
|
29
|
RNFetchBlob.config({ fileCache : true })
|
30
|
|
- .fetch('GET', `${TEST_SERVER_URL}/params?time=${time}&name=RNFetchBlobParams&lang=中文`)
|
|
30
|
+ .fetch('GET', encodeURI(`${TEST_SERVER_URL}/params?time=${time}&name=RNFetchBlobParams&lang=中文`))
|
31
|
31
|
.then((resp) => {
|
32
|
32
|
let file = resp.path()
|
33
|
33
|
return RNFetchBlob.fs.readStream(resp.path(), 'utf8')
|
|
@@ -58,7 +58,7 @@ describe('GET request with params', (report, done) => {
|
58
|
58
|
describe('POST request with params', (report, done) => {
|
59
|
59
|
let time = Date.now()
|
60
|
60
|
RNFetchBlob.config({ fileCache : true })
|
61
|
|
- .fetch('POST', `${TEST_SERVER_URL}/params?time=${time}&name=RNFetchBlobParams&lang=中文`, {}, RNFetchBlob.base64.encode('123'))
|
|
61
|
+ .fetch('POST', encodeURI(`${TEST_SERVER_URL}/params?time=${time}&name=RNFetchBlobParams&lang=中文`), {}, RNFetchBlob.base64.encode('123'))
|
62
|
62
|
.then((resp) => {
|
63
|
63
|
let file = resp.path()
|
64
|
64
|
return RNFetchBlob.fs.readStream(resp.path(), 'utf8')
|