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) {
$scope.RequestList[$scope.request.index].checkboxToReject = "false";
alert('The request could not be rejected. \n\n Don\'t use especial characters: &%!"#.. ');
}).finally(function (a) {
});
Comentarios
Publicar un comentario