Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-accepted

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-accepted

Mimetype filtering of GET requests.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

get-accepted

This module sets the accept header of a get request to a url to the specified mimetypes and then also aborts the request when the returned mimetypes don't match this mimetypes.

It doesnt support wildcard mimetypes yet.

Install with npm install get-accepted.

Usage

var getAccepted = require('get-accepted');

var url = 'http://www.npmjs.org';
var mimetypes = ['text/html'];

getAccepted(url, mimetypes, function (res) {
  if (res) {
    res.pipe(process.stdout);
  }
});

FAQs

Package last updated on 21 May 2014

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc