$("#myForm").submit(function (e){ $.ajax({ url: "https://192.168.100.58/apigateway/se/exp/chatbot/api/instance.php?idProcess=PRC0008&cdProduct=39&nmInstance=testePostAjax", dataType: 'json', type:'POST', beforeSend: function(xhr){ xhr.setRequestHeader('Authorization', 'Basic eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjkxMzAyODMsImV4cCI6MTc2NzIyNTU0MCwiaWRsb2dpbiI6ImRvdWdsYXNkb3NjaWF0dGkiLCJyYXRlbGltaXQiOjEyMCwicXVvdGFsaW1pdCI6MTAwMDAwfQ.Dhn0QKDBmoTC84FZpFg6zRGveH34TBu49xeNldkH_p4'); xhr.setRequestHeader('Acess-Control-Allow-Origin', '*'); xhr.setRequestHeader('Acess-Control-Allow-Headers', "Origin, X-Requested-With, Content-Type, Accept"); }, async: false, }).done(function(response){
}); });