The code below it is working, however my question is: Is there any way to do a post on two different addresses simultaneously using that same code without repeating it?
For example, in the code below I insert data into a table, but there are other fields on my page that go to another table. In this situation is there any artifice that can be done in that same code or would I have to repeat it and insert the data from the other table?
$.ajax({
url:'http://localhost:8080/teste/rest/cadastro',
type:'POST',
contentType: "application/json",
data : dados,
dataType: 'JSON',
success: function(data) {
}
});
Thank you in advance!