API with php vanilla returns data null
Closed this issue · 1 comments
YoungC0DE commented
I created an API with php vanilla, and when I try to make a request with the GET method,
passing a json data the data is null in the API getting with file_get_contents('php://input')
In a test with insomnia I can see the values arriving in the API but in my frontend project consuming the API the data values are null when they arrive in the API
Why does it happen?
YoungC0DE commented
I solved this by passing the values in the URL with params, so I can get everything without problems