updated
This commit is contained in:
@@ -43,7 +43,7 @@ local function playTTSFile(value)
|
|||||||
local headers = {
|
local headers = {
|
||||||
["Content-Type"] = "application/x-www-form-urlencoded"
|
["Content-Type"] = "application/x-www-form-urlencoded"
|
||||||
}
|
}
|
||||||
|
|
||||||
print("Sending HTTP POST request")
|
print("Sending HTTP POST request")
|
||||||
local response = http.post({
|
local response = http.post({
|
||||||
url = ttsRoute,
|
url = ttsRoute,
|
||||||
@@ -55,7 +55,9 @@ local function playTTSFile(value)
|
|||||||
|
|
||||||
print("HTTP POST request successful" )
|
print("HTTP POST request successful" )
|
||||||
local data = response.readAll()
|
local data = response.readAll()
|
||||||
print(data)
|
local responseData = textutils.unserialiseJSON(data, { parse_null = true })
|
||||||
|
print(data.MP3)
|
||||||
|
print(data.URL)
|
||||||
response.close()
|
response.close()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user