JSON prirez API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
README.md
prirez.json

README.md

Prirez JSON API (2018)

Due to Croatia not having API for surtax values, I decided to create my own.


Pošto Hrvatska nema svoj API za prirez, odlučio sam napraviti svoj.

How to use

Javascript(ES6)

fetch('prirez.json')
.then((response)=>{
  return response.json();
}).then((json)=>{
  return json.prirez;
})

jQuery

$.getJSON('prirez.json', function(data){
  return data;
});

Javascript(ES5)

var xmlhttp = new XMLHttpRequest(),
  method = 'GET',
  url = 'https://developer.mozilla.org/';

xmlhttp.open(method, url, true);
xmlhttp.onload = function () {
  return xmlhttp.response;
};
xmlhttp.send();