Created
March 6, 2013 05:08
-
-
Save mikeknoop/5096877 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- this script will receive a click, trigger a zapier webhook POST | |
-- then redirect the user on to the final location | |
zid = request.query.zid | |
nxt = request.query.next | |
url = "https://zapier.com/hooks/catch/n/" .. zid .. "/" | |
http.request { | |
url = url, | |
method = "POST", | |
headers = { | |
["Content-Type"] = "application/json", | |
}, | |
data = json.stringify(request), | |
} | |
return 302, '', { | |
Location=nxt | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment