This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
Silent failure with null
header value #241
Closed
Description
Requests appear to silently fail when a header value is null
.
This code works fine:
const headers = {
'Content-Type': 'multipart/form-data'
};
const files = [
{
name: 'image',
filename: 'image.jpg',
type: 'image/jpeg',
data: RNFetchBlob.wrap(filePath)
}
];
RNFetchBlob.fetch('POST', url, headers, files)
.then((response) => { console.log('response: ', response); })
.catch((err) => { console.log('error: ', err); });
This code silently fails, and neither resolves or rejects:
const headers = {
'Content-Type': 'multipart/form-data',
Authorization: null
};
const files = [
{
name: 'image',
filename: 'image.jpg',
type: 'image/jpeg',
data: RNFetchBlob.wrap(filePath)
}
];
RNFetchBlob.fetch('POST', url, headers, files)
.then((response) => { console.log('response: ', response); })
.catch((err) => { console.log('error: ', err); });
Using
"react-native-fetch-blob": "0.10.2-beta.1",
"react-native": "0.39.2",