Lua php post request

hello i just wanted to understand how it works and how i can send data from lua to php. If someone could help me i would be glad. This is what i tried so far:

lua:

PerformHttpRequest("http://X.X.X.X/Save.php", function(err, text, headers) 
local test = '{ name: "John", age: 31, city: "New York" }'

end, 'POST',  test,  { ["header"] = 'application/json' })

php

<?php
$value1 = json_decode($_POST["test"]); 
$current = file_get_contents('./people.txt');
$current .= $value1;
file_put_contents('./people.txt', $current);
?>

I too am interested in this. It will ping my script but doesn’t send me any data via post.