Good afternoon! I am making an application that uses an api rest system with Codeigniter REST API. I created the user registration function, and doing tests with postman, all perfect, you can register well and it does not give problems. This api is in link .
Then I have a web app, with a registration form, that by AJAX calls api.mydomain / registration / register and sends the post parameters of the form.
This web app is in web.midominio
The code I use to make the call to the api is this:
<script>
$("#btn_enviar").click(function(){
$.post("http://api.midominio.com/registration/register",
$("#form_registro").serialize(),
function(data,status)
{
alert(data);
}
);
});
</script>
When I click on the button, it calls me to the api and it gives a 200 OK but it does not return any response. For example, if the fields are empty you should receive a JSON with error: true and feedback: "Fill in all the fields". But looking at the chrome inspector does not show me anything.