Peter Short
Peter Short

Reputation: 772

Angular 2 http delete doesn't make network requests

Other verbs work fine to my api but delete doesn't fire anything in the network tab on chrome Dev tools

Upvotes: 18

Views: 7156

Answers (1)

Thierry Templier
Thierry Templier

Reputation: 202148

I guess that you forgot to subscribe on the request. Observables are lazy so you need to subscribe to actually execute them. It must be done even if you don't expect a payload in the response.

Something like that:

this.http.delete().subscribe((res) => {
});

Upvotes: 48

Related Questions