79073284

Date: 2024-10-10 07:58:15
Score: 0.5
Natty:
Report link

Solved the issue by actually receiving the body as json format in my php and sending it back in the same format

$jsonData = file_get_contents('php://input');
    $data = json_decode($jsonData, true);
    if ($data !== null) {
    $name = $data['username'];
        echo json_encode($name);
    } 
    else {
        echo json_encode('e no work');
    }
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Being47