api de gestion de ticket, basé sur php-crud-api. Le but est de décorrélé les outils de gestion des données, afin
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

client.html 592B

123456789101112131415161718192021
  1. <html>
  2. <head>
  3. <script src="../lib/php_crud_api_transform.js"></script>
  4. <script>
  5. var xhttp = new XMLHttpRequest();
  6. xhttp.onreadystatechange = function() {
  7. if (this.readyState == 4 && this.status == 200) {
  8. console.log(this.responseText);
  9. jsonObject = php_crud_api_transform(JSON.parse(this.responseText));
  10. document.getElementById('output').innerHTML = JSON.stringify(jsonObject, undefined, 4);
  11. }
  12. };
  13. xhttp.open("GET", "http://localhost/api.php/posts?include=categories,tags,comments&filter=id,eq,1", true);
  14. xhttp.send();
  15. </script>
  16. </head>
  17. <body>
  18. <pre id="output"></pre>
  19. </body>
  20. </html>