javascript - Multipart request does not work -
this have, put different blogs trying describe how multipart request in angular. however, not work. says bad request (400). wrong? because miss content-type beneath content-disposition header? how add if case?
var fd = new formdata(); fd.append('data', server); return $http.post('/servers', fd, { transformrequest: angular.identity, headers: { 'content-type': undefined } });
request payload chrome
------webkitformboundaryowougkw6gayclwsb content-disposition: form-data; name="data" {"status":"rejected","description":"test"} ------webkitformboundaryowougkw6gayclwsb--
Comments
Post a Comment