Skip to content

Instantly share code, notes, and snippets.

@hisapy
Created June 21, 2013 02:57
Show Gist options
  • Save hisapy/5828514 to your computer and use it in GitHub Desktop.
Save hisapy/5828514 to your computer and use it in GitHub Desktop.
$.ajax({
crossDomain: true,
type: "GET",
url: "https://ws.elfarosrl.net:3000/categories",
contentType: "application/json; charset=utf-8",
data:{
access_token: "a7632c8200bc27b95ed11c999ff20c944dfbb0a8",
last_imported_at: -1
}
}).done(function(data, textStatus, jqXHR){
$('#hisa').css('background-color', 'green');
$('#hisa p').text(data);
}).fail(function(jqXHR, textStatus, errorThrown){
$('#hisa').css('background-color', 'red');
$('#hisa p').text('CORS ha fallado...'+textStatus+'...');
console.log('cors error: '+errorThrown);
});
@hisapy
Copy link
Author

hisapy commented Jun 21, 2013

This only works if I first navigate to the page and then accept the certificate manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment