todo_api/examples/client.html
Maurits van der Schee a70bce09cd improved examples
2015-11-03 00:16:16 +01:00

15 lines
440 B
HTML

<html>
<head>
<script src="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,categories,tags,comments?filter=id,eq,1&callback=callback" defer="defer"></script>
</head>
<body>
<pre id="output"></pre>
</body>
</html>