Skip to content

Instantly share code, notes, and snippets.

@jagoda
Last active June 11, 2018 23:35
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 jagoda/cb40343e5be930472a1a661ae1b476d1 to your computer and use it in GitHub Desktop.
Save jagoda/cb40343e5be930472a1a661ae1b476d1 to your computer and use it in GitHub Desktop.
Alpha Request
const Alpha = require('@lifeoic/alpha');
async function performRequests () {
const client = new Alpha();
const httpResponse = await client.get('http://example-service/some/path');
const lambdaResponse = await client.get('lambda://example-function:some-alias/some/path');
console.log(`http service responded with ${httpResponse.status}`);
console.log(`lambda service responded with ${lambdaResponse.status}`);
}
performRequests();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment