0
the code of the Component
onSubmit(form){
var success = false;
var error = false;
this.http.post(`http://localhost/api/`,
JSON.stringify(form.value))
.map(res => res)
.subscribe(dados => console.log(dados));
}
the php code of the server
if(!isset($_POST)):
ResultJson(['erro'=> true, 'messagem'=> 'nenhum dado foi informado']);
else:
var_dump($_POSt);
endif;
the problem is that returns an empty array I’ve tried several ways and can’t solve anyone can help me? I appreciate the strength of vcs
See that there is a typo in your PHP code:
var_dump($_POSt);
->var_dump($_POST);
– NilsonUehara
I managed to solve rsrs the problem was not that but I managed to thank
– Alisson Almeida
If you have already succeeded you can delete the question or answer it yourself and mark your answer as correct
– Paz