1.3.0 • Published 2 years ago

@schirrel/request v1.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

Request

A simple promise based and single file wrapper for newers to start using Fetch API.

For those who dont want a big library to simple requests, and yet want to simplify the fetch use.

npm version

Installing

Just import the Request.js file or run npm i @schirrel/request.

Examples

See Example Folder

GET

Request.get("https://jsonplaceholder.typicode.com/todos/1")
.then((res) => {})
.catch((err) => {});

POST

Request.post('https://jsonplaceholder.typipre.com/posts', {
    body: {
        title:'Ahoy'
    }
})
.then((res) => {})
.catch((err) => {});

PUT

Request.put('https://jsonplaceholder.typicode.com/posts/1', {
body: {
   id:1,
   title:'Ahoy'
    }
 })
.then((res) => {})
.catch((err) => {});

DELETE

Request.delete('https://jsonplaceholder.typicode.com/posts/1')
.then((res) => {})
.catch((err) => {});

For a http client you can also check api-request current under development

1.3.0

2 years ago

1.2.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago