PHP Update API php://input returning unexpected response

48 Views Asked by At

I am creating an API to update. When I call the API in Postman, I get a strange response when I var_dump what I am to get.

Here is my code:

$data = json_decode(file_get_contents("php://input"));
var_dump(file_get_contents('php://input'));

And here is response I see on Postman

string(272) "----------------------------065126822322612777394821
Content-Disposition: form-data; name="id"

382
----------------------------065126822322612777394821
Content-Disposition: form-data; name="status"

Created
----------------------------065126822322612777394821--
"

I am not sure what this response really means, I have tried searching but with no concrete results. Also, how do I get the values passed from params in Postman?

0

There are 0 best solutions below