Fetchu [1.0.3] — Simplify your Http requests!

Frame 594

Part of imacodr OSS Pack
Frame 723 fetchu (You are here!)Group rssFrame 730 Roarn


[:blue_book:Documentation] | [:file_folder: Source Code]

Inspired by Node.js’ node-fetch. fetchu is a lightweight module created to simplify Roblox’s HttpService for faster and efficient requests. Our goal is to minimize all the work you do for one request in a single line of code.


Why fetchu?

Using a tool like fetchu can simplify all Http requests out of Roblox to a single line of code while fetchu handles all errors. Its as easy as doing this:

local fetchu = require(path/to/fetchu)

local response = fetchu.get("https://pokeapi.co/api/v2/pokemon?limit=1", {headers = {
    ["Authorization"] = "my token for authorization!"
}, nocache = true})

print(response)

--[[
    Returns:
    {"count":1118,"next":"https://pokeapi.co/api/v2/pokemon?offset=1&limit=1","previous":null,"name":"bulbasaur","url":"https://pokeapi.co/api/v2/pokemon/1/"}
--]]

Installation

with Roarn

To install fetchu with Roarn you can simply do the following command:

roarn install fetchu

Learn more on how Roarn, a Roblox package manager helps your workspace.

with Wally
Add this line to your wally.toml

fetchu = "imacodr/fetchu@1.0.3"

with Roblox

If you are preferably using Roblox Studio to develop code you can also install our module through the Roblox marketplace.

Roblox Module

with GitHub

You can also install our package from GitHub releases easily. We have ZIP files available for Rojo users although we would prefer you using Roarn for a more organized workspace.


Questions?

If you have any questions on how fetchu works, please reply on this post! I’ll be answering all questions here.

If you have more concerns or need help with fetchu we have community servers!

1024-gold 2

Made with :heart: by imacodr

7 Likes

Thanks for making this project! I’ll make sure to use this in my future games!

[1.0.2] Added auto tablefy option to requests

You can add a tablefy: boolean? option to all requests so it returns the result already as a Lua table for a faster workspace. We will remain having the fetchu.tablefy() function for now though for users that prefer to use it.

Suggest!

We are looking for suggestions on what to do add to Fetchu. If you have any suggestion please reply bellow.

[1.0.3] Generating GUIDs

Added the ability to generate a GUID (UUID) on with the fetchu.generateGUID function.

Fixed headers glitch.

is there promise support

30charlimit

I have tested promise support but at the end I thought it would be better not including it.

Wally support

Fetchu is now available on another package manager Wally!

1 Like