This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
AceSevenFive's profile picture

How can I pass variables to http.get via user input?

Started by AceSevenFive, 19 August 2015 - 03:37 PM
AceSevenFive #1
Posted 19 August 2015 - 05:37 PM
What I want to do is make a knowledge compendium for the modded server I play on, using http.get to get content from my Dropbox. I'm not sure how to pass a variable to http.get via user input.

What I want to happen is:

Say user types in "turtle"

Program opens the dropbox page on turtle [say it's AceSevenFive/Turtle]
Lupus590 #2
Posted 19 August 2015 - 08:45 PM

local path = "www.dropbox.com/AceSevenFive" --#change this to whatever is the url to you dropbox
local folder = read()
local handle = http.get(path.."/"..folder) --#combine path and folder to make the full url