make request to service in ajax using angular also

1

I try to consume it in the following way

function listar( $scope, $http, cliente) {

    $http({
    method: "POST",
    data: cliente,
    url: "http://ver.moz.com.mx/movil//Servicios.svc/getEstadosReferenciasPorClienteDetalle" + cliente+'5000',
    headers: {
        'Content-Type': 'application/json; charset=utf-8',
        'dataType': 'json'
    }

    }).then(function mySuccess(response) {
        $scope.estados = response.data;
        console.log(response.data);
        var array = JSON.stringify(response.data);
        $scope.estados = JSON.parse(array);
    }, function error(response) {
        $scope.myerror = response.statusText;

    });

}

and I get it by mistake

  

bad request

    
asked by Emanuelle Garcia 27.02.2018 в 23:39
source

0 answers