Created
September 21, 2016 03:37
-
-
Save dayvsonlima/2ec663a7f4dc811f879a89d5f3d7320c to your computer and use it in GitHub Desktop.
Ajax cross subdomain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.ajax("http://domain.local:3000/resource", { | |
| method: 'GET', | |
| xhrFields: { withCredentials: true }, | |
| crossDomain: true, | |
| success: function(data){ console.log(data) }, | |
| error: function(data){ console.log('deu ruim') } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment