So I have invoked an API using PHP with the following code:
$url_get_fc = 'http://apiurlhere';
//Send the request
$response_fc = curl_exec($ch_fc);
curl_close($ch_fc);
//Check for errors
if($response_fc === FALSE){
die(curl_error($ch_fc));
}
// Decode the response
$responseData_fc = json_decode($response_fc, TRUE);
// sessionStorage
sessionStorage.setItem(responseData_fc);
console.log(set);
Now, I am trying to store the json file being passed by the API inside the sessionStorage on the browser. Is this possible? Not so sure how to store it in the browser since I know sessionStoage is javascript? Hope someone could enlighten me