Server API
RTTP
Outbound HTTP client for server-to-external-API calls — set a base URL and shared headers once, then fire Get/Post/Put/Delete with automatic retry and a chainable Promise API.
Server only |
HttpService:RequestAsync is not available on the client. RTTP will error if called from a LocalScript.
Import
local rttp = RoExpress.RTTP.New({ baseUrl = "https://api.example.com" })
setup
Configuration
Create an RTTP client with a base URL, shared headers, and retry count. Update any setting at runtime with SetBase, SetHeader, and SetRetries.
RTTP.New(config)
→
GET
POST
PUT
DELETE
HTTP Methods
Callback and Promise variants for every HTTP verb. Bodies are JSON-encoded automatically. Every response carries ok, status, data, headers, and raw.
rttp:Get · rttp:Post · rttp:Put · rttp:Delete
→
resilience
Retry & Backoff
5xx responses and connection errors trigger automatic exponential backoff. Configure max attempts and delays, or disable retries entirely per client.
retry · backoff · maxAttempts
→
See also
Promise | the chainable async API returned by *Async methods ·
App | inbound routing (server receives requests from clients) ·
Network | client-to-server requests