You can write your topic however you want, but you need to answer these questions:
I’m trying to send a request to a firebase database and I keep getting the error “Unable to cast Dictionary”
I’ve tried rewriting the code but then I get another error. I’m quite sure it’s something with the header.
local value = game.HttpService:JSONEncode({isStaff = true,banned = true, length = '1', reason = 'yeah'})
if type(value) == "string" and value:len() >= 1 and value:sub(1,1) ~= "{" and value:sub(1,1) ~= "[" then
value = '"'..value..'"';
end
game:GetService("HttpService"):PostAsync("The Database url"..game:GetService("HttpService"):UrlEncode("PlayerInformation")..game:GetService("HttpService"):UrlEncode("directory" and "/".."directory" or "")..".json?auth=".."A secret authorization token", value, true, {["X-HTTP-Method-Override"]="PUT"})
Thanks for any help in advance!