0.0.2 • Published 4 years ago

@henrikdk/myfetch v0.0.2

Weekly downloads
3
License
ISC
Repository
-
Last release
4 years ago

myFetch

A school project around the concept of UMD. It's possible to fetch for Node and with backwards compatibility on older browsers using XMLHttpRequest.

How to install

npm i @henrikdk/myfetch

How to use

    const myFetch = require("@henrikdk/myfetch");

    myFetch.init({
        address: "https://reqres.in/api/users/",
        key: "Authorization key"
    });

    myFetch.get("1").then(result => console.log(result));
    //Expected output: Object from api.

Functions

  • GET - Retrieve data from API.
  • PUT - Replace data from API.
  • PATCH - Modify data from API.
  • REMOVE - Remove data from API.
  • POST - Create data to API.
0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago