# requestdetector

> Simple http/https detector(get response headers)

Latest version **1.0.2** (published 2020-01-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install requestdetector
pnpm add requestdetector
yarn add requestdetector
bun add requestdetector
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-01-31 |
| First published | 2020-01-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | cxm |
| Maintainers | cxm |
| Keywords | get, headers |

## Links

- npm: https://www.npmjs.com/package/requestdetector
- Repository: https://github.com/chenxianming/getheader
- Homepage: https://github.com/chenxianming/getheader#readme
- Issues: https://github.com/chenxianming/getheader/issues
- npm.io page: https://npm.io/package/requestdetector

## Recent versions

- 1.0.2 (latest) — 2020-01-31
- 1.0.1 — 2020-01-30

## README

# requestdetector
Simple http/https detector(get response headers)

[![NPM version](https://img.shields.io/npm/v/requestdetector.svg)](https://www.npmjs.com/package/requestdetector)
[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
[![npm](https://img.shields.io/npm/dt/requestdetector.svg)](https://www.npmjs.com/package/requestdetector)
[![node](https://img.shields.io/node/v/requestdetector.svg)](https://nodejs.org/en/download/)


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

---
_Source: https://npm.io/package/requestdetector · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
