Socket
Socket
Sign inDemoInstall

requestdetector

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    requestdetector

Simple http/https detector(get response headers)


Version published
Maintainers
1
Install size
16.4 kB
Created

Readme

Source

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 );

Keywords

FAQs

Last updated on 31 Jan 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc