Help using :PostAsync

How can I get this to work (below) also how do you setup the headers? I have tried to look at the roblox dev page on it but it does not really help.

		url: '',

firstly, add https:// before your URLs or requests will not work

second, :PostAsync() takes a tuple as input, not a table.

citation: HttpService:PostAsync

local HttpService = game:GetService("HttpService")
HttpService:PostAsync("", HttpService:JSONEncode({
	-- data here
}), Enum.HttpContentType.ApplicationJson, false, { -- change content type if u want
	-- headers here

wrap in a pcall, also i sure hope you are confident in your authentication flow if you’re willing to expose your urls publicly

1 Like