Request in postman (chrome extension) works, but with ajax not

1

I am making a request to a private API via POST. First I did the tests via Postman extension, everything went well.

I then ran tests with the ajax request and it does not work the same way.

Restangular.oneUrl("app" , "meutoken").get().then(function (data){
    var tokenF = data; //aqui eu trago um token desta api, e ele realmente vem

    //aqui eu envio o POST
    $.ajax({
        type : "POST",
        url : "formulario",
        data : {
            nome : formulario.nome,
            email : formulario.email,
            telefone : formulario.telefone,
            assunto : formulario.assunto,
            mensagem : formulario.mensagem,
            tokenForm : tokenF
        },
        async : false,
        success : function (data){
            alert(data.mensagem)
        }
    });
});

Following the chrome developer tools, I see that all the parameters have been sent, but the server response is that tokenF is not being sent, but the other fields are.

    
asked by anonymous 15.05.2015 / 23:18

0 answers