Check out example codes for "angular headers for enc type". It will help you in understanding the concepts better.

Code Example 1

this.uploadFileToUrl = function(file, uploadUrl){
        var fd = new FormData();
        fd.append('file', file);
        $http.post(uploadUrl, fd, {
            transformRequest: angular.identity,
            headers: {'Content-Type': undefined}
        })
        .success(function(){
        })
        .error(function(){
        });
    }

Learn ReactJs, React Native from akashmittal.com