The Professional HTTP Library
for Roblox.
Go beyond HTTPService. rURL is a reliable, cURL-inspired tool for all your HTTP tasks—GET, POST, JSON validation, Lua table conversion, and more.
Full HTTP Support
Reliably perform GET, POST, PUT, DELETE, and other requests. More powerful and consistent than the default HTTPService.
Seamless JSON
Automatically decode JSON into Lua tables and encode Lua tables into JSON, with built-in validation.
Developer Focused
Check MIME types, debug requests, and level up your experience sending data to webhooks or interacting with any API.
Why rURL?
Roblox's built-in HttpService is powerful, but it has limitations. rURL is designed to be a more reliable and feature-rich alternative, giving you greater control and consistency.
- Enhanced Reliability: Built-in retry logic and better error handling for more resilient requests.
- cURL-like Interface: An intuitive and familiar API for those who have worked with web requests before.
- MIME Type Checking: Automatically validate URI/Ls to ensure you're working with the right data types.
- Advanced Data Handling: Superior JSON to Lua table conversion and vice-versa, handling edge cases that `HttpService` might miss.
rURL Usage Examples
1. GET Request
Fetch data from a URL using a simple GET request.
local rURL = require(game.ReplicatedFirst.rURL)
local url = "https://example.org"
local success, response = pcall(function()
return rURL:GET(url)
end)
if success then
print("GET response:")
print(response)
else
warn("GET request failed:", response)
end
2. POST Request with JSON Data
Send data to an API endpoint using a POST request. rURL automatically handles JSON encoding.
local rURL = require(game.ReplicatedFirst.rURL)
local url = "https://example.org/api"
local data = {
username = "David",
score = 100
}
local success, response = pcall(function()
return rURL:POST(url, data)
end)
if success then
print("POST response:")
print(response)
else
warn("POST request failed:", response)
end
3. PUT Request
Update resources on a server with a PUT request.
local rURL = require(game.ReplicatedFirst.rURL)
local url = "https://example.org/api/user/123"
local data = { score = 200 }
local success, response = pcall(function()
return rURL:PUT(url, data)
end)
if success then
print("PUT response:", response)
else
warn("PUT request failed:", response)
end
4. DELETE Request
Remove resources from a server with a DELETE request.
local rURL = require(game.ReplicatedFirst.rURL)
local url = "https://example.org/api/user/123"
local success, response = pcall(function()
return rURL:DELETE(url)
end)
if success then
print("DELETE response:", response)
else
warn("DELETE request failed:", response)
end
5. Custom HTTP Request (PATCH)
For methods like PATCH or other less common HTTP verbs.
local rURL = require(game.ReplicatedFirst.rURL)
local url = "https://example.org/api/special"
local method = "PATCH"
local data = { message = "Hello World" }
local success, response = pcall(function()
return rURL:Custom(url, method, data)
end)
if success then
print("Custom request response:", response)
else
warn("Custom request failed:", response)
end
6. JSON Helpers
Easily convert between Lua tables and JSON strings.
local rURL = require(game.ReplicatedFirst.rURL)
-- Lua table to JSON
local myTable = { name = "David", level = 5 }
local jsonString = rURL:EncodeToJSON(myTable)
print("JSON string:", jsonString)
-- JSON string to Lua table
local luaTable = rURL:DecodeJSON(jsonString)
print("Decoded table:", luaTable.name, luaTable.level)
7. MIME Type Detection
Determine the MIME type of a URI or URL.
local rURL = require(game.ReplicatedFirst.rURL)
local url = "https://example.org/image.png"
local typeShort, typeFull = rURL:MIME_Type(url)
print("MIME type short:", typeShort)
print("MIME type full:", typeFull)
Ready to get rURL?
The fastest way to use rURL in any script, straight out of the box. Just copy and paste this one-liner.
loadstring(game:HttpGet('https://rurl.dmx3377.uk/script/main.lua'))()