Skip to content

Instantly share code, notes, and snippets.

@philipnewcomer
Created November 13, 2017 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philipnewcomer/103b3080792183b7f28c8b2ff363e3f4 to your computer and use it in GitHub Desktop.
Save philipnewcomer/103b3080792183b7f28c8b2ff363e3f4 to your computer and use it in GitHub Desktop.
Request Test (Node CLI App)
{
"dependencies": {
"sync-request": "^4.1.0"
}
}
#!/usr/bin/env node
const request = require('sync-request');
const objectCacheDropinRequest = request(
'GET',
'https://raw.githubusercontent.com/pantheon-systems/wp-redis/master/object-cache.php'
);
console.log( objectCacheDropinRequest.getBody().toString() );
@AaronHolbrook
Copy link

How do I install this?

@philipnewcomer
Copy link
Author

@AaronHolbrook this is just a barebones Node CLI app. Drop the two files in an empty directory somewhere on your system, run npm install, and then ./request-test.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment