Skip to content

Instantly share code, notes, and snippets.

@donpinkus
Created September 22, 2014 18:11
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 donpinkus/0a591632df0d9c6821cd to your computer and use it in GitHub Desktop.
Save donpinkus/0a591632df0d9c6821cd to your computer and use it in GitHub Desktop.
# airscript
-- Sample script to make an HTTP request with query parameters
local response = http.request {
url = 'http://www.random.org/integers/',
params = {
num=1, min=0, max=1, format='plain',
rnd='new', col=1, base=10
}
}
if tonumber(response.content) == 0 then
return 'heads'
else
return 'tails'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment