1
I am developing an application with Vue.JS and Jquery. The call is being made like this in Vue:
methods: {
efetuarLogin: function (event) {
event.stopPropagation();
$.ajax({
type: 'post',
crossDomain: true,
data: JSON.stringify(this.Usuario),
dataType: 'application/json',
contentType: 'application/json',
url: 'http://localhost:5000/api/login',
complete:function(jqXHR, textStatus){
console.log(jqXHR+' - '+textStatus);
}
});
}
},
The call is made twice. One of the returns has the result 204 (No Content).
Won’t it be the CORS pre-flight? See if the first one isn’t
OPTIONS
and the secondPOST
.– Sergio
Hello Sergio. How do I check? By the header verb?
– Gilmar Sousa