Skip to content

dfusic/prirez-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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();

Releases

No releases published

Packages

No packages published