🔍 /
🧮 Funções · http

http.post(url, body?, opts?)

http.post(url, body?, opts?)
📝HTTP requests to outside Discord. Always go through the same security filter: response size limit, timeout, blocking of localhost/private IPs, and a request limit per script run.

Parâmetros

AssinaturaTipo(s)
http.post(url, body?, opts?)string, any?, object?

Valor de retorno

{ ok, status, headers, body, json, text }

📝opts.headers accepts a custom headers object in every method. On servers without this feature unlocked, calling any http method throws an error explaining which plan is required.

Exemplo de uso

let res = http.post("https://api.exemplo.com/logs", { evento: "comando_usado" })
print(res.status)

Observações

💡 Confira os tipos esperados na tabela de Parâmetros antes de chamar — passar um tipo diferente do esperado é a causa mais comum de erro em tempo de execução.

← Ver todas as funções de http