Skip to content

Instantly share code, notes, and snippets.

@claudiohilario
Created October 26, 2017 00:06
Show Gist options
  • Save claudiohilario/727e0eb12d2a214c7ae8bf7a9151ec76 to your computer and use it in GitHub Desktop.
Save claudiohilario/727e0eb12d2a214c7ae8bf7a9151ec76 to your computer and use it in GitHub Desktop.
Teste ajax funcional
$.ajax({
contentType: 'application/json',
data: JSON.stringify({"teste":"valor_teste"}),
dataType: 'json',
type: 'post',
url: '<?php echo base_url('registar/teste_json') ?>',
success: function (data) {
alert(data.modo);
},
error: function (data) {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment