This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Description
Hello!
I run into a strange behavior. I am debugging my app with Charles 4.2. Our backend supports if-modified-since header. I am sending a request with the last-modified date to our image backend. In charless i get status code 304 but when i console.log the status code in app I get 200.
I even have content length but according to Charles I do not download any body.
When I send the request without is-modified-since I have same headers in Charles and in app.
"react-native-fetch-blob": "0.10.8",
"react-native": "0.49.3"
const fetchImage = (url, headers, cached) => (
RNFetchBlob.config({
appendExt: 'jpg',
fileCache: true
}).fetch('GET', url, headers)
.then(res => {
const status = Math.floor(res.info().status);
//If request fails or not modified return cached path
if (status !== 200) {
return cached;
}
//If request OK with 200
const resHead = res.respInfo.headers;
cacheImage(url, res.path(), resHead['Last-Modified'] || resHead['last-modified']);
return res.path();
})
);