1.1.1 • Published 6 years ago
ajiac v1.1.1
Ajiac
Ajiac is library that allows you to create simple and fast ajax requests based on promises.
Examples
Here is some examples of usages of the library.
Making a get request request
ajiac.get("posts")
.then((data) => {
console.log("data loaded !", data);
})
.catch((err) => {
console.error(err);
});
You can also specify params:
ajiac.get("posts", {title: "Hello world"})
.then((data) => {
console.log("data loaded !", data);
})
Installation
Here are a few methods for installing Ajiac.
From download
You simply avec to download the file located at: dist/ajiac.js
. Then, you can include it in your html:
<script src="dist/ajiac.js"></script>
With NPM
Ajiac is also available on npm. You simply avec to download the library by running this command:
npm i ajiac