Cs fixes
This commit is contained in:
parent
ec6fa53be4
commit
6c6b441642
1 changed files with 6 additions and 5 deletions
|
|
@ -4,11 +4,11 @@
|
||||||
<script>
|
<script>
|
||||||
var xhttp = new XMLHttpRequest();
|
var xhttp = new XMLHttpRequest();
|
||||||
xhttp.onreadystatechange = function() {
|
xhttp.onreadystatechange = function() {
|
||||||
if (this.readyState == 4 && this.status == 200) {
|
if (this.readyState == 4 && this.status == 200) {
|
||||||
console.log(this.responseText);
|
console.log(this.responseText);
|
||||||
jsonObject = php_crud_api_transform(JSON.parse(this.responseText));
|
jsonObject = php_crud_api_transform(JSON.parse(this.responseText));
|
||||||
document.getElementById('output').innerHTML = JSON.stringify(jsonObject, undefined, 4);
|
document.getElementById('output').innerHTML = JSON.stringify(jsonObject, undefined, 4);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xhttp.open("GET", "http://localhost/api.php/posts?include=categories,tags,comments&filter=id,eq,1", true);
|
xhttp.open("GET", "http://localhost/api.php/posts?include=categories,tags,comments&filter=id,eq,1", true);
|
||||||
xhttp.send();
|
xhttp.send();
|
||||||
|
|
@ -18,3 +18,4 @@ xhttp.send();
|
||||||
<pre id="output"></pre>
|
<pre id="output"></pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue