Roblox Requests: Simple, powerful HTTP in Roblox

Roblox Requests is a simple and elegant yet powerful HTTP library, based on the well known Python Requests.

local r = http.get("")

print(r.status_code, r.message)
-- 200 OK

local repos = r:json()
-- 30

-- application/json
-- utf-8
-- 59

The main purpose of Requests is to avoid the manual labor of HttpService.
Consider this code comparison: httpservice.lua · GitHub

This isn’t all that Requests is good for. Here’s some other features that will make your life easier:

  • Functions for every HTTP verb
  • DOM parser allows you to navigate HTML, XML
  • Sessions with cookie persistence, base URLs/headers
    • Configurable rate-limiting to help you balance your game’s HTTP usage
  • Automatic query string building, JSON body encoding
  • Accessible Response object with useful data, builtin JSON decoding
  • Multipart form building, including file encoding and upload
  • Domain based key/value cookies
  • Local and Global Response Caching
    • DataStore and MessagingService backed global cache for large resources
  • Builtin support for Promises

How To Install

You can find full documentation at If you have any suggestions or bug reports, feel free to let me know here or contribute on the GitHub page, or join my Discord: paric's potatoes


Promise Support

Roblox Requests now supports Roblox Lua Promises. I think this addition will make the library more useful to many Roblox devs looking for a more robust solution for HTTP requests in Roblox.

Here’s an example of using the library’s existing methods with Promises:

        for _, repo in ipairs(response:json()) do
        if err.request_sent then
            print("HTTP Error:", err.response.status_code, err.response.message)

    -- HTTP Error: 404 Not Found

For more info on using Promises, see the project documentation:

Full changelog and module download:


HTML/XML Parsing

Roblox Requests will now generate a DOM for you from HTML/XML response content or a string, powered by lua-htmlparser.

A full guide for this functionality can be found at

Here’s an example use case that finds all the links on GitHub’s front page:

local document = http.get(""):html()

for _, url in ipairs(document:absolute_links()) do

-- ...

Woah, this is a very convenient and useful Roblox module. It may be one of the only modules that I use in my actual work.

This relieves a lot of my stressful API work that is handled on my own site due to Roblox being to send advanced requests.


Update 0.5

Roblox Requests 0.5 adds response caching and fixes several breaking bugs.

The binary for this version can be downloaded here:



  • http.send(…) renamed to http.request(…)
  • session:send(…) renamed to session:request(…)

Bug Fixes

  • HTML/XML parser shouldn’t freeze when parsing large files
  • fixed issue where malformed JSON errors wouldn’t be logged properly
  • no longer breaks on responses with no content-type header

update: just pushed a small bug fix for 0.5! If you use any of the promise_ methods from 0.5.1, they will throw a deprecated method warning. Fix by updating to the latest release: Release 0.5.4 - Response Caching · jpatrickdill/roblox-requests · GitHub

1 Like

Wow, this library’s a hidden gem! As a big fan of the Python requests library, I’m in love already :slight_smile:

I noticed a tiny issue with sending files using multipart/form-data, wherein extra \r\n was preceding my data. I submitted an issue (#16) and a pull request which fixes it over on GitHub. It was causing me trouble while using the Telegram Bot API’s sendDocument method.


Would this presumably work properly or well alongside my node and .js coded bot on repl?

1 Like

If you’re talking about importing the Roblox Requests module into repl then no, It will not work that was as repl does not have support for Roblox Engine API’s like HttpService.

If you’re asking if you can use Roblox Requests to communicate with your API deployed on repl then yes. Roblox Requests is just a wrapper of HttpService that allows you to more easily write and handle requests.