I am setting the boundary for the below post call but on chrome the boundary looks different from the one I set. how do I get my custom boundary "--test" to show up on the request payload?
var url = '/site/apkUpload';
var deferred = $q.defer();
console.log(formdata);
$http.post(url, formdata, {
processData: false,
headers: {'Content-Type': "multipart/form-data; charset=utf-8; boundary='--test'",
'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
'x-access-token': token,
'cache-control': 'max-age=0'}
})
.success(function (response) {
deferred.resolve(response);
})
.error(function (reject) {
deferred.reject(reject);
});
return deferred.promise;
Request payload on chrome:
------WebKitFormBoundaryB5LjM2a6Qly3Xruj Content-Disposition: form-data; name="packageName"
helo1 ------WebKitFormBoundaryB5LjM2a6Qly3Xruj Content-Disposition: form-data; name="name"
......
Thanks a lot!
$http.post(url, data, {transformRequest: myTransformer})