I was using react native 0.48.3 and getting response from fetch request i don't see any encoding problem it resolves by itself the encoding problem because the content-type of my response is : application/json;charset=iso-8859-1 . Now i upgraded my react native app to 0.59.8 i don't know why fetch doesn't resolve encoding problem anymore althought it's the same code . I have just upgraded my app . Do you have any idea ? Here is my fetch code :
export const setDocumentListDataAsync = (k, action, server) => {
return () => {
fetch(defineUrlForDocumentList(action, server), {
credentials: 'include',
headers:{
contentType: "application/json; charset=utf-8",
}
})
.then(
(response) => {
var contentType = response.headers.get('content-type')
console.warn(contentType)
return response
}
).then((response) => {
return response.json()
}).catch((err) => {
console.log(err)
})
}
}