0.1.0 • Published 4 months ago

@niknils/requests v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

@niknils/requests

make sync and async requests in web

support engines

  • Node.js (fetch & child_proc for sync)
  • Browser (XMLHttpRequest for sync)

note

  • async methods in developing; see repository for more

import

cdn or Node.js:

var { req } = require('@niknils/requests');

sync

//false for sync or detect by onsuccess and onerror functions
req(false, "my request")
.then(200, ()=>{
	console.log('HTTP code - 200');
}).else((r)=>{
	console.log(`HTTP code - ${r.code}`);
})

this prorotype of readme; actual documentation see in repository