ng-idle
ng-idle copied to clipboard
keepalive onPingResponse subscribe response doesnt work right
[X] bug report
Current behavior this subscription must return the web-service response used to update session expiry time "keepalive.onPingResponse.subscribe(response => console.log(response);"
Expected behavior after subscribe onPingResponce the response.status must return the status of invoked http request in "response.status" example: 200 for success
Minimal reproduction of the problem with instructions the main problem is that this subscription always return first a response that contain a type equal to 0 after that it return the real webservice response (response.status not null ) for each keepalive webservice pingRequest but in the other hand when the webservise return request.status different to 200 (not success) we get first also a response that contain a type equal to 0 and no other response.
What is the motivation / use case for changing the behavior? my expected behavior is that method return only response that contain the http request status in case of success or fail of web-service invocation and remove the responce that contain type equal to 0 "response.type = 0"
Please tell us about your environment: Ubuntu, visualCode, npm
-
@ng-idle version: 6.0.0-beta.3
-
Angular version: 6.x
-
Browser: all
-
Language: TypeScript 2.7.2
-
Node:
node --version
= v10.9.0