it is the first time i learn how to write an api. i have the folder structure of: apihub/v1/api.php
the GET part works: i get all the customers and a customer according to an id. i have issue with POST variables.
i read that instead of reading POST array one should use : file_get_contents("php://i
so i have this code:
$customer = json_decode(file_get_contents("php://input"));
and when i use the chrome extension i get NULL, but if i don't use the json_decode i so get the json string. what am i missing here? and how can i use that, cause according to it i want to write the query to the database.