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

fastly

Package Overview
Dependencies
Maintainers
3
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastly

Fastly API client for Node.js

  • 1.2.1
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

fastly

Fastly API client for Node.js

Build Status

Installation

npm install fastly

Basic Use

var fastly = require('fastly')('yourapikey');

fastly.request('GET', '/content/edge_check?url=mysite.com/foo', function (err, obj) {
    if (err) return console.dir(err);   // Oh no!
    console.dir(obj);                   // Response body from the fastly API
});

Helper Methods

The fastly module also includes a few limited "helper" methods that make working with common API resources a bit simpler:

Method Example
purge
fastly.purge('host.com', '/index.html', callback);
Link
purgeAll
fastly.purgeAll('myServiceId', callback);
Link
purgeKey
fastly.purgeKey('myServiceId', 'key', callback);
Link
stats
fastly.stats('myServiceId', callback);
Link

Testing

npm test

Keywords

FAQs

Package last updated on 11 Dec 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