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

How to set the name in Roblox HTTP request?

Asked by
9mze 193
2 years ago
Edited 2 years ago

The request responds with "The name is invalid." I set the name but it doesn't work.

local HttpService = game:GetService("HttpService")
local ServerScriptService= game:GetService("ServerScriptService")

local Http = require(ServerScriptService.Modules.Http)

local request = {
    name = "name"
}

local function callback(success, result)
    print(success, result)
end

Http:send({
    Body = HttpService:JSONEncode(request),
    Method = "POST",
    Url = "https://badges.roblox.com/docs#!/Badges/post_v1_universes_universeId_badges"
}, callback)

Answer this question