I've been trying to send some data in React Native with HTTP fetch
, but I can't send fairly large chunks of data. It stops sending from about 2200 characters of text.
export const postServerData = (myURL, myJSONData, callback) => {
fetch(myURL, {
method: 'POST', // or 'PUT'
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(myJSONData),
})
.then(response => response.json())
.then(myReturnedData => {
callback(myReturnedData);
})
.catch(error => {
});
};
From a few articles, data cap is quite fairly large :
The maximum POST request body size is configured on the HTTP server and typically ranges from 1MB to 2GB
How can I send larger chunks in React Native (Android)?