Yuari
Documentation
Docs/HTTP/http_post

http_post

Performs a POST and returns the body or an error string. Aliases: httppost, httpPost, syn_httppost, posthttp, HttpPostAsync, httppostasync.

Syntax

http_post(url: string, body?: string, content_type?: any) -> string

Parameters

ParameterTypeDescription
urlstringThe target URL.
body?stringThe request body to send.
content_type?anyThe content_type value used by the call.

Returns

TypeDescription
stringThe body or an error string

Description

http_post is part of the HTTP library. HTTP helpers use the module's own WinHTTP client, so they are not limited by Roblox HttpService rules.

The operation is performed immediately using the arguments supplied at the call site.

The aliases HttpPost(...) resolve to the same implementation.

Example

local body = http_post("https://httpbin.org/post", '{"name":"yuari"}', "application/json")
print(body)

Notes

  • Aliases: HttpPost(...).
  • HTTP calls use the module's WinHTTP client and require network access.