So I been tryna turn HttpService and I made a script that did something with HTTP heres the script
local HttpService = game:GetService("HttpService") local URL_ASTROS = "Censored link." -- Make the request to our endpoint URL local response = HttpService:GetAsync(URL_ASTROS) -- Parse the JSON response local data = HttpService:JSONDecode(response) -- Information in the data table is dependent on the response JSON if data.message == "success" then print("There are currently " .. data.number .. " astronauts in space:") for i, person in pairs(data.people) do print(i .. ": " .. person.name .. " is on " .. person.craft) end end
Now this returns the output 14:28:11.611 - Http requests are not enabled. Enable via game settings I checked everything I made sure it was saved and everything but it keeps returning this . by the way this was done in a server script. So I wanted to check if httpservice was on so I put in a server script print(game.HttpService.HttpEnabled)
and it returned in the output 14:23:14.566 - The current identity (2) cannot HttpEnabled (lacking permission 3)
does anyone know why this is happening is there like a reason this is happening or am I just doing something wrong
Hello, again. Hopefully, i have found the answer to your question. So, all you have to do is to enable HttpRequest in the game's SETTINGS inside OPTIONS.
The next thing you should do, is to use a SCRIPT instead of a LOCALSCRIPT, or using a SCRIPT to run that line of code from a MODULE SCRIPT.
Basically, when you START the game, it should print everything that is inside that site.
If that also doesn't work, it means that you are not allowed to use HTTP service in that place, this could happen if your in someone else's place.
Good Luck!