function APIResponse()

in 0.1-SimplePhpFunction/src/index.php [23:31]


function APIResponse($body)
{
    $headers = array("Content-Type"=>"application/json", "Access-Control-Allow-Origin"=>"*", "Access-Control-Allow-Headers"=>"Content-Type" ,"Access-Control-Allow-Methods" =>"OPTIONS,POST");
    return json_encode(array(
        "statusCode"=>200,
        "headers"=>$headers,
        "body"=>$body
    ));
}