Skip to content

JavaScript Library - Groups HTTP requests by entity

Notifications You must be signed in to change notification settings

lullaby6/fetcher.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fetcher.js

Installation

<script src='https://cdn.jsdelivr.net/gh/lullaby6/fetcher.js/cdn.js'></script>       

Usage

const todosFetcher = fetcher({
    url: 'https://jsonplaceholder.typicode.com/todos',
    type: 'json',
})

const todoOne = await todosFetcher.get({
    query: 1
})

console.log(todoOne);

const first10Todos = await todosFetcher.get({
    params: {
        _limit: 10
    }
})

console.log(first10Todos);

About

JavaScript Library - Groups HTTP requests by entity

Topics

Resources

Stars

Watchers

Forks