Hi, I´m now trying to create a simple PHP HTTP POST.
What am I doing wrong in this code to get it to work?
:
</body>
Hi, I´m now trying to create a simple PHP HTTP POST.
What am I doing wrong in this code to get it to work?
:
</body>
What does this do?
$json = json_decode($data, true);
Can you post the result?
What is the output of this code, it’s unlikely anyone has PHP installed to test it.
James
I get no result.
This:
$json = json_decode($data, true);
I´m doing this because the data needs to be json when you are sending it to Event Store.
Am I doing wrong here?
The code executes without any problem. I´m using NetBeans and I have put the code into a PHP application project.
What is the contents of $json after running that function?
I don´t know. I´m no expert in PHP. That´s why I´m asking for help to get this HTTP POST to work.
My suspicion is that json_decode will deserialize json rather than serialise your structure into it.
Try using the netbeans debugger to inspect what the code is doing while it is running?
You want json_encode