I have been trying to upload form-data, but I do not want to send any Content-Type header. I have tried setting
headers: {
'X-Content-Type-Options': 'nosniff',
'Content-Type': undefined
}
But the request still contains
Content-Type:multipart/form-data; boundary=----WebKitFormBoundarykplXRCRn92v5Op52
The code block for reference :
$http({
url: "/file/",
method: 'POST',
data: {
'file': res
},
headers: {
'Content-Type': undefined
}
})
I am unable to understand what exactly is happening. Any help would be greatly appreciated.
PS: I understand what is multipart-form data. I just need to strip off that header.