I consider it quite simple to execute a GET request, I usually use:
//$serverurl contem a url da api para a função desejada
try {
$cursos = file_get_contents($serverurl);
} catch (Exception $e) {
}
After getting a json response, I use json_decode()
and work on that data.
But I'm having difficulty executing a POST request, where I need to pass some parameters to the webservice.
I would like to know the best way to do this.
If possible, I did not intend to use curl because I already encountered restrictions where I could not use it ...