Firebase real time DB problem

I have an error every time I request my Firebase database.

Here is the code:

--[[
3/25/22 Sam

Module for Fire base real time Database.

]]

local HTTP = game:GetService("HttpService")
local RS = game:GetService("RunService")

local DB_URL = 'https://roblox-a6eda-default-rtdb.firebaseio.com/'; -- URL to DB

local FB_Main = {}

FB_Main.__index = FB_Main;


function FB_Main.ViewStructure() : string
	return HTTP:GetAsync(DB_URL..".json")
end

function FB_Main.PUT()
	
	
	print(HTTP:PostAsync(DB_URL..".json", [[-X PUT -d '{"Test" : 2}']]))
end




return FB_Main
local MOD = require(game.ServerStorage.FBRealTime)

print(MOD.ViewStructure())
MOD.PUT()
print(MOD.ViewStructure())

Here is the error:

Its okay I solved it.

public static void Register(HttpConfiguration config)
{
    config.MessageHandlers.Add(new CustomMessageHandler ());
     // Web API routes
    config.MapHttpAttributeRoutes();
     config.Routes.MapHttpRoute(
        name: “DefaultApi”,
        routeTemplate: “api/{controller}/{id}”,
        defaults: new { id = RouteParameter.Optional }
    );
}
2 Likes

wait a minute, that’s not lua :face_with_raised_eyebrow:

3 Likes

he’s sending a LUA request to his c++ server.

or he pasted the wrong code.