I'm trying to fetch a pdf from an url but I have to send a formData with the request. I couldn't understand how to achive that. is POST only used for uploading files?
const req = RNBlobUtil.config({
fileCache: false,
path: filePath,
addAndroidDownloads: {
useDownloadManager: false,
notification: false,
mime: 'application/pdf',
path: filePath,
title: fileTitle,
}
})
.fetch("POST", url, {
'Content-Type': 'multipart/formdata'
}, [{param1: 'value1',param2: 'value2'}]);
where am I doing wrong? I can reach the pdf from same url with axios call it responses. but in RNBlobUtil it results empty invalid pdf.