shark-netlib
v1.2.4
Published
Shark netlib - a Simple Get Function as a Promise
Downloads
83
Readme
Shark netlib
Install: npm i shark-netlib
Example:
const shnet=require("shark-netlib");
shnet("https://example.com", true).then((data)=>{console.log(data.body);console.log(`SRC (IF REDIRECTION, CONTAIN URL WHERE THIS PROGRAMM GET data.body): ${data.redirectedto})`)}, (err)=>{console.error("an error occured");});//DETECT IF IT IS http or https and use the correct function
(SECOND ARG: FOLLOW REDIRECTS (bool))