Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aganglada/chicky
🐥 window.fetch() api interface
https://github.com/aganglada/chicky
api fetch http interface xhr
Last synced: about 4 hours ago
JSON representation
🐥 window.fetch() api interface
- Host: GitHub
- URL: https://github.com/aganglada/chicky
- Owner: aganglada
- Created: 2017-02-26T13:35:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-29T08:37:14.000Z (about 7 years ago)
- Last Synced: 2024-10-18T06:40:28.553Z (28 days ago)
- Topics: api, fetch, http, interface, xhr
- Language: JavaScript
- Size: 12.7 KB
- Stars: 27
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🐥 chicky
window.fetch() api interface
* **Minimal** basic interface for *window.fetch()*.
* **Easy to use** http methods.
* Supported in old browsers IE8+ (using [unfetch polyfill](https://github.com/developit/unfetch))
* Written in ES6.## Install
You can install `chicky` from npm.
```markdown
npm install chicky --save
```or from yarn
```markdown
yarn add chicky
```## Usage
```javascript
import chicky from 'chicky';chicky.get('http://api.github.com/aganglada')
.then(data => {
console.log(data);
});
```## Methods
#### get
Get data from anywhere at any time.
```javascript
import chicky from 'chicky';chicky.get('http://api.github.com/aganglada')
.then(data => {
console.log(data);
});
```#### post
Create new data for a better future.
```javascript
import chicky from 'chicky';chicky.post('http://api.github.com/aganglada', {
repo: {
name: 'chicky'
}
})
.then(data => {
console.log(data);
});
```#### put
Update data to maintain the world.
```javascript
import chicky from 'chicky';chicky.put('http://api.github.com/aganglada', {
repo: {
name: 'chicky',
owner: 'alex'
}
})
.then(data => {
console.log(data);
});
```#### patch
Change data of a single person and make it optimal.
```javascript
import chicky from 'chicky';chicky.patch('http://api.github.com/aganglada', {
repo: {
name: 'chicky',
owner: 'alex'
}
})
.then(data => {
console.log(data);
});
```#### delete
Get rid of things you don't need.
```javascript
import chicky from 'chicky';chicky.delete('http://api.github.com/aganglada', {
repo: {
name: 'chicky'
}
})
.then(data => {
console.log(data);
});
```## Contribute
If you like to contribute to this project be sure all the changes you made,
make sense for everyone and they can continue using `chicky` as their general api service.## License
MIT © aganglada