Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is this PostAsync() correct?

Asked by 10 years ago

Yea the GetAsync() is working like it should but the PostSync() is erroring :/

local function ReturnSync()
print(game:GetService('HttpService'):GetAsync("https://code.stypi.com/raw/ma/DatabasePhp/ChatData", true))
end

function Sync()
wait(5)
print('Chat Saving')
if (Sky['HttpAble'])==true then
local function PostSync()
local Http=game:GetService('HttpService')
local Link=(Sky['ChatLog'])
local MyJSON=Http:JSONDecode(Link)
Http:PostAsync("https://code.stypi.com/ma/DatabasePhp/ChatData", MyJSON) 
wait() return ReturnSync()
end
else error('Http Not Permited') print('Chat Error')
end
end

coroutine.wrap(function()
Sync()
end)
0
I think the site needs to be able to parse the JSON data you send it. I believe the site needs to have a JavaScript code to collect the JSON and use it. Tkdriverx 514 — 10y
0
Hmmm so maybe Pastebin? I believe thats Java coded. jillmiles1 3 — 10y

Answer this question