todo_api/examples/client.html
Mark van Driel 3bbcdc6ff8 Fixed examples
2016-03-22 20:51:08 +01:00

15 lines
455 B
HTML

<html>
<head>
<script src="../lib/php_crud_api_transform.js"></script>
<script>
function callback(jsonObject) {
jsonObject = php_crud_api_transform(jsonObject);
document.getElementById('output').innerHTML = JSON.stringify(jsonObject, undefined, 4);
}
</script>
<script src="http://localhost/api.php/posts?include=categories,tags,comments&filter=id,eq,1&callback=callback" defer="defer"></script>
</head>
<body>
<pre id="output"></pre>
</body>
</html>