I am new to angular . In my application, i want to upload a file to the server . according to the api , 'Content-Type' header should be null or not sent. I googled and developers proposed to set the header as undefined . The below is my code
return $resource(apiHost +'/tessters/:patId?action=:action&format=:format', {patId: '@patId' , action: '@action' ,format: '@format'}, {
save: {
method: 'POST',
transformRequest: angular.identity,
headers: {'Content-Type' : undefined,'Authorization': authorizationToken},
}
});
but in the developer view , i am able to observe that the 'Content-Type' is set to text/plain;charset=UTF-8
and i could not be able to find any ways to remove 'Content-Type' header , If anyone knows the solutions please help me out
Thanks in advance