Ruby Scrape Webhook

Here we make notes on Wards webhook implementation. We have a successful webhook running based on old Ruby code, and a curl hack.

# Testing the webhook

You can test the webhook using curl:

curl -H "Content-Type: application/json" -X POST -d '{"username":"mkyong","password":"abc"}' https://rest.livecode.world/scrape

And then observe the resulting report generated and stored as page-json at this link: - Webhook Results

You may need to force the refresh of the cache to ensure you are seeing the latest version of the page.

The Ruby Scrape Webhook is currently not doing any checking of the HTTP request. It will accept a POST or a GET request, You can trigger the webhook, and update the stored result by using the browser to generate an HTTP GET request: - http://rest.livecode.world/scrape

# Future

Currently the ruby scrape webhook tries to display some of the webhook parameters from Ward's code, it currently does no checking - so you can effectively POST anything to the endpoint.

We are currently not receiving webhook POST notifications from Ward. When we have this regularly running we will add password and possibly IP checking, and use the webhook to trigger the Atopia Server indexing.