Angularjs removes header on http delete request -
i'm trying make http request method delete server , server responds 411, length required. when try set in request seems angular removes it. code have:
var delete = function (url) { return $http.delete(url,{ method: 'delete', url: url, headers: { 'content-length': 0 } }); };
this see when @ actual request made:
user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:31.0) gecko/20100101 firefox/31.0 referer: http://localhost:8877/ host: localhost:8877 connection: keep-alive accept-language: en-us,en;q=0.5 accept-encoding: gzip, deflate accept: application/json, text/plain, */*
no content-length. why remove , how can fix it?
try add body request though empty 1 data: ''
Comments
Post a Comment