L
L
LarexSetch2014-10-04 15:15:08
Angular
LarexSetch, 2014-10-04 15:15:08

Is it possible to configure angular to track response codes on every $http request?

There is a distributed application: client-server. The server only sends data, the client outputs information.
I need to constantly monitor each request for an HTTP response code, because the server part can send codes like 4XX, 5XX, and the angular client application must react in a certain way to such response codes.
The option with constant processing of such responses in controllers is not suitable, actions must be defined once.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LarexSetch, 2014-10-04
@LarexSetch

Solution found: angular.ru/api/ng.$http "Response interceptors"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question