1

This is the Network tab: See Image 1, at bottom.

This is the Console tab: See Image 2, at bottom.

So, How can this be ? The results are from the same POST request. Why does it says status 200, if it is an error ? Why there is so much difference ? Both of those request give me an empty response!, but if I try the request with Postman, the REST client Extension for Chrome it returns a response !, see Image 3 at bottom.

To make the request, I´m using JQuery (and jQuery mobile). Here is the code:

$.ajax({
    url: 'http://example.com/rest/auth',
    data: {
        action : 'login',
        user_email: 'user',
        user_password:  'password',
    },
    type: 'post',                  
    async: 'true',
    xhrFields: {
        withCredentials: true,
    },
    crossDomain : true,
    contentType: 'application/x-www-form-urlencoded',
});        

Network: Image Network


Console Image Console


Postman REST Client
enter code here


Related questions:

  1. CORS using ajax within PhoneGap+jQuery Mobile not working on device but is on browsers
  2. "No 'Access-Control-Allow-Origin' header is present on the requested resource"
Community
  • 1
  • 1

0 Answers0