AngularJS $http DELETE request Content-Type header -


when make delete request angularjs $resource module, angular adds content-type: application/xml header request headers. in angularjs source code, there section removes content-type request header when no parameters sent. but, don't understand why happen, doesn't works.

here how make delete request:

$resource('/my/topics/:topicid').remove({ topicid: 1}, successfn, errorfn 

and here headers browser

accept:application/json, text/plain, */* accept-encoding:gzip,deflate,sdch accept-language:en-us,en;q=0.8 connection:keep-alive content-length:0 content-type:application/xml cookie:session=0a627145415440740d6cc8cd35d19ba3; __ngdebug=true host:localhost:9001 origin:http://localhost:9001 referer:http://localhost:9001/ user-agent:mozilla/5.0 (macintosh; intel mac os x 10_8_4) applewebkit/537.36 (khtml, gecko) chrome/29.0.1547.57 safari/537.36 

where content-type header come from?

edit: i'm using angularjs 1.2.0rc1

i found workaround: https://github.com/angular/angular.js/issues/2149#issuecomment-22664501

i hope merge fix angularjs master.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -