I am building an API in PHP and when a user uses the api to POST or PUT, they will pass some data through in JSON format. When the request arrives at the script intended, what php function do I use to get access to the data sent?
Thanks!
I am building an API in PHP and when a user uses the api to POST or PUT, they will pass some data through in JSON format. When the request arrives at the script intended, what php function do I use to get access to the data sent?
Thanks!
there is json_decode function that takes string input converts to json array or object... here you can read documentation.