Ir al contenido principal

Entradas

Mostrando entradas de abril, 2016

AngularJS send request with special characters

    In this case the request have the following components: URL: ./Provider/ChangeStatusRequest/' with parameters:  + $scope.request.accessProvider_ID + '/' + false + '/' + encodeURIComponent(rejection_message) + '/' The function encodeURIComponent() allows to send special characters. To get the response is the funtion:   .then(function(){}) To get the erros use the function .catch      $http.get('./Provider/ChangeStatusRequest/' + $scope.request.accessProvider_ID + '/' + false + '/' + encodeURIComponent(rejection_message) + '/')             .then(function(a) {             if (a > 0) {                 $scope.RequestList[$scope.request.index].checkboxToReject = "true";             }             }).catch(function (a) {       ...