fastly
fastly copied to clipboard
Fastly API client for Node.js
fastly
Fastly API client for Node.js
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 | |
Link |
| purgeAll | |
Link |
| purgeKey | |
Link |
| softPurgeKey | |
Link |
| stats | |
Link |
| datacenters | |
Link |
| publicIpList | |
Link |
| edgeCheck | |
Link |
Testing
npm test
