Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var request = new XMLHttpRequest();
- request.open('GET', 'do kommt dei url diest in browser einfügst eina inkl. https oder http wenn verfügbar', true);
- request.onload = function () {
- var jsonData = JSON.parse(this.response);
- if (request.status >= 200 && request.status < 400) {
- //Do sand deine JSON daten jetzt in da variable "jsonData".
- } else console.log(`Could not connect to JSON-Server! Code: ` + request.status);
- };
- request.send();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement