Skip to content

Delete elements of a JSON encoded in a $_COOKIE

Good morning! In the code below, I did a programming logic to delete an element in a JSON, but it is encoded within a $_COOKIE. <?php $desire = json_decode($_COOKIE['desire']); // JSON …

cURL request won’t work with data from fetch API

I’m sending some data with the fetch API to a translate.php file, here is my JS code: const translation = { word: ‘Hello’ }; fetch(‘http://yandex.local/translate.php’, { method: ‘POST’, body: …

json rpc 2.0 in laravel api errors on add request

I add https://github.com/sajya/server for making json rpc over my laravel 8. I just follow the instructions provided here to test it https://sajya.github.io/docs/ All works for the basic example, But if I add params to the curl string an error is raised an error that i cannot understand: my code: my route api…