This project is not affiliated with Fastly.
Fastly now maintain their own API client for JavaScript. Consider using that instead.
npm install fastly
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
});
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 |
npm test