1.0.2 • Published 4 years ago

requestdetector v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

requestdetector

Simple http/https detector(get response headers)

NPM version License npm node

npm install requestdetector
const detect = require('requestdetector');

Example:1 (async/await)

(async () => {
    try{
        let info = await detect({
            url: 'https://www.78pan.com/api/stats/hls/2018/05/22/aDeuR3Zp/out005.ts',
            timeout:20000
        });
        console.log(info);
    }catch(e){
        console.log(e);
    }
})();

Example:2 (chain called)

detect({
    url: 'https://www.78pan.com/api/stats/hls/2018/05/22/aDeuR3Zp/out005.ts',
    timeout:20000
}).then( (info) => {
    console.log( info );
} ).catch( e => console.log );
1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago