Hey so for POST/PUT requests simply doing
$http.post(url, body, headers)
worked fine
But with DELETE it gets my body, but completely ignores my headers...
$http.delete(url, body, headers)
Hey so for POST/PUT requests simply doing
$http.post(url, body, headers)
worked fine
But with DELETE it gets my body, but completely ignores my headers...
$http.delete(url, body, headers)
The two key elements to include in your options are the
data
anContent-Type
(as part of yourheaders
object). Your request would look something like:Credit goes to @Harshit Anand for his on another SO post.
The documentation is terrible, with v1.3.20 you need to do:
$http.delete(url, {data: {...}, headers: {...}})
... which is completely different than post/put for some reason.