Skip to content

melon.http

garryspins edited this page Feb 27, 2026 · 4 revisions

melon.http


shared link

HTTP wrapper that runs http requests when available
melon

Functions

melon.http.Generator

shared link internal
melon.http.Generator(type: string) -> fn

Argument and Return information

Arguments

# Name Type Description
1 type string Type of HTTP request, POST, HEAD, GET, ect

Returns

# Name Type Description
1 fn fn Function that calls the given request using [melon.HTTP]

Generates a new function to create a request of the given type

melon.http.Get

shared link
melon.http.Get(url: string, onsuccess: fn, onfailure: fn, headers: table)

Argument and Return information

Arguments

# Name Type Description
1 url string URL to make the request to
2 onsuccess fn Callback to run on success, gets same as http.Post
3 onfailure fn Callback to run on failure, gets same as http.Post
4 headers table URL to make the request to

Make a GET request with melon.HTTP

melon.http.Head

shared link
melon.http.Head(url: string, onsuccess: fn, onfailure: fn, headers: table)

Argument and Return information

Arguments

# Name Type Description
1 url string URL to make the request to
2 onsuccess fn Callback to run on success, gets same as http.Post
3 onfailure fn Callback to run on failure, gets same as http.Post
4 headers table URL to make the request to

Make a HEAD request with melon.HTTP

melon.http.Post

shared link
melon.http.Post(url: string, onsuccess: fn, onfailure: fn, headers: table)

Argument and Return information

Arguments

# Name Type Description
1 url string URL to make the request to
2 onsuccess fn Callback to run on success, gets same as http.Post
3 onfailure fn Callback to run on failure, gets same as http.Post
4 headers table URL to make the request to

Make a POST request with melon.HTTP

Clone this wiki locally