Skip to content

simple library for making http requests(GET/POST/PUT/PATCH/DELETE) using es5,es6&es7 standards

License

Notifications You must be signed in to change notification settings

ryan-k8/LazyReqs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LazyReqs

simple library for making http requests (GET/POST/PUT/PATCH/DELETE)

usage

GET/DELETE

  • specify url eg
const http = new lazyReq();
http
  .get("https://jsonplaceholder.typicode.com/posts")
  .then((response) => console.log(response));

POST/PUT/PATCH

  • specify url , data & isJSONobj (boolean)
    • (if your data is already JSON string then set third param as false,else if its a JSON obj set third param as true)
const http = new lazyReq();
http // third param --> true(for JSONobj only) & false for JSON strings
  .post("https://jsonplaceholder.typicode.com/posts", Data, true)
  .then((response) => console.log(response));

PRs

Pull requests are welcomed especially ones that solve error handling with fetch api

LICENSE

  • MIT

About

simple library for making http requests(GET/POST/PUT/PATCH/DELETE) using es5,es6&es7 standards

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published