Skip to content

Instantly share code, notes, and snippets.

@adrianjguerrero
Created June 9, 2021 14:45
Show Gist options
  • Save adrianjguerrero/d56aa5fea20f583737d2c69238155f04 to your computer and use it in GitHub Desktop.
Save adrianjguerrero/d56aa5fea20f583737d2c69238155f04 to your computer and use it in GitHub Desktop.
api simulation
<?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json");
$timeout = isset($_GET['timeout']) ? $_GET['timeout'] : 0;
sleep($timeout);
echo json_encode([
'timeout' => $timeout
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment