diff options
author | Manuel Bachmann <manuel.bachmann@iot.bzh> | 2015-12-29 21:55:10 +0100 |
---|---|---|
committer | Manuel Bachmann <manuel.bachmann@iot.bzh> | 2015-12-29 21:55:10 +0100 |
commit | 0878627c7c4ca29e04621a48513018cbd4195124 (patch) | |
tree | e64ccc76d07c20ea51e6b962c76eb94f1b0df82e /afb-client/app | |
parent | 07bbb1900acc411da012291f6c0530230a1110e0 (diff) |
Switch TokenRefresh to HTTP GET
We are doing HTTP POST calls with no data in TokenRefresh
widget, which is time-consuming and can lead to crashes
with libmicrohttpd > 0.9.30. Use HTTP GETs instead.
Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
Diffstat (limited to 'afb-client/app')
-rw-r--r-- | afb-client/app/Frontend/app.js | 2 | ||||
-rw-r--r-- | afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/afb-client/app/Frontend/app.js b/afb-client/app/Frontend/app.js index 5e99d77..72e8123 100644 --- a/afb-client/app/Frontend/app.js +++ b/afb-client/app/Frontend/app.js @@ -30,7 +30,7 @@ config.$inject = ['$urlRouterProvider', '$locationProvider']; - console.log ("***location=" + window.location + " search" + window.search) + console.log ("***location=" + window.location + " search" + window.search); function config($urlProvider, $locationProvider, ConfigApp) { $urlProvider.otherwise('/home'); diff --git a/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js b/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js index 834aaff..82e43a5 100644 --- a/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js +++ b/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js @@ -73,7 +73,7 @@ angular.module('TokenRefresh', ['ConfigApp', 'ModalNotification']) // Check Binder status scope.getping = function() { - var handler = $http.post(ConfigApp.session.ping+'?token='+ ConfigApp.session.token); + var handler = $http.get(ConfigApp.session.ping+'?token='+ ConfigApp.session.token); // process success and error handler.success(scope.onsuccess); @@ -85,7 +85,7 @@ angular.module('TokenRefresh', ['ConfigApp', 'ModalNotification']) // Check Binder status scope.refresh = function() { - var handler = $http.post(ConfigApp.session.refresh+'?token='+ ConfigApp.session.token); + var handler = $http.get(ConfigApp.session.refresh+'?token='+ ConfigApp.session.token); // process success and error handler.success(scope.onsuccess); @@ -96,7 +96,7 @@ angular.module('TokenRefresh', ['ConfigApp', 'ModalNotification']) // Initial connection scope.tkcreate = function() { - var handler = $http.post(ConfigApp.session.create+'?token='+ ConfigApp.session.initial); + var handler = $http.get(ConfigApp.session.create+'?token='+ ConfigApp.session.initial); // process success and error handler.success(scope.onsuccess); |