Can I download a file using a HTTP POST method endpoint?
E.g. Expo.FileSystem.downloadAsync('http://myhost/my-post-endpoint', someBodyData, ....);
I need to consume this endpoint with a body data.
By now, I’m using fetch API to retrieve the file, but I’m stucked with his result. I got a Blob object, without a fileUri. In my use case, I need a fileURI, not a Blob itself.
fetch('http://myhost/my-post-endpoint', {
method: 'POST',
headers: {
"Accept": " image/png"
},
body: JSON.stringify(someBodyData),
})
.then(res => res.blob())
.then(blob => console.log(blob)) ////Where is the fileUri from the blob file? Where this blob file is downloaded? Where is my mother?
Someone can help me? Thanks!