Using URL with HTTP not working

Hello guys! I have this HTTP url:

local FavoriteItems  = {2,8,9,10,11,12,13,17,18,19,21,24,27,28,29,30,31,32,34,38,40,41,42,43,44,45,46,47,62,64,65,66,67,68,69,70,71,72}
local FavoritesList = table.concat(FavoriteItems, ",")
local url = "https://www.roproxy.com/users/favorites/list-json?assetTypeId="..FavoritesList.."&itemsPerPage=100&userId=".. UserId,

however I don’t think I can just shove a table in like i would be able to for a normal http request because of the “assetTypeId=” requirement. How would i change “assetTypeId=” to just “assetType=” so that I am able to just shove a table in like how I’m doing (To limit the requests) ?

Right now the data is just: “AssetType does not exist.”

Try json encoding it?

game:GetService("HTTPService"):JSONEncode(FavouriteItems)

what’s the difference
eeeeeeeeeeeeeeee

Makes it go into the correct format, based on the url

i have some other urls and this method doesn’t work for those. I have been having trouble testing if this works for getting their favorites because the way my code works is it loops through the URLs and runs the same code for all the URLS

JSON are more universal and transferable data. It seems you are concatenating the entire table of FavoriteItems resulting in a string of arbitrary numbers?

What exactly are you trying to do here?

I’m trying to only have to send one request to get all the items. This works on all the other HTTP requests I’ve done. I’m creating a game that gets people’s information based off the username that the local player puts in a box. I want this loading time to be very quick and sending a seperate request for each favorite item category is WAY too slow.

for example this works:

    local assets = "Audio,Place,Model,Decal,Gear,Animation,Plugin,MeshPart,Package,Video"
    local url = "https://inventory.roproxy.com/v2/users/"..UserId.."/inventory?assetTypes="..Avatars.."&itemsPerPage=100&sortOrder=Asc"

		local inventory = {}
		local cursor = nil
		repeat
			
			if cursor then
				url ..= "&cursor="..cursor
			end
			
			
			local data = Http:GetAsync(url,true)
			data = Http:JSONDecode(data)
			if data["data"] then
				if #data.data > 0 then
					for i,b in pairs(data.data) do
						table.insert(inventory, b)
					end
				end
			else

					for i,b in pairs(data.Data) do
						table.insert(inventory, b)
				end
			end
			

			if data.nextPageCursor then
				cursor = data.nextPageCursor
			end

		until not data.nextPageCursor