How do i pass headers Parameters using JQuery Post? i have this jquery post.
$(document).on('submit',"#store_form", function(e) {
e.preventDefault();
$("#store_loader").fadeIn();
term = $( this ).serialize(),
url = $( this ).attr( "action" );
$.post( 'http://example.com/v1/user/create', term, function( data ) {
$( "#return_store" ).html( data );
});
$("#store_loader").fadeOut();
});
i had this error:
XMLHttpRequest cannot load http://example.com/v1/user/create. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8888' is therefore not allowed access.
If you are using PHP you can fix it adding something like this on your PHP script: