Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 1 KB

README.md

File metadata and controls

25 lines (20 loc) · 1 KB

lambda-curl-test

Description

A very simple Node.js Lambda function which:

  • Fires up following a POST to an API endpoint (e.g. from scheduler app)
  • Accepts a single URI parameter in the post body
  • Curls the supplied URI using child_process
  • On the process callback, extracts the response headers (results)
  • Uses a HTTP client to post those results to an API (e.g. to receiver app)

Installation

Test invocation of plugin: curl -X POST -d '{"uri":"www.aerian.com"}' --header "Content-Type:application/json" https://9vu6dew62a.execute-api.eu-west-1.amazonaws.com/dev/testCurl

Tail the access logs of the 'callbackUri' and wait for the callbackPost.