Skip to content

Instantly share code, notes, and snippets.

@mikeknoop
Created March 6, 2013 05:08
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 mikeknoop/5096877 to your computer and use it in GitHub Desktop.
Save mikeknoop/5096877 to your computer and use it in GitHub Desktop.
-- 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