-
Notifications
You must be signed in to change notification settings - Fork 3
Home
github-actions[bot] edited this page Apr 11, 2026
·
4 revisions
Official documentation for PawnREST: an open.mp/SA-MP component that provides inbound HTTP routes, outbound HTTP/WebSocket clients, and a node-based JSON API for Pawn scripts.
| Page | Scope |
|---|---|
| Getting Started | Install, bootstrap, and first working routes |
| API Reference | Complete native/constant reference from PawnREST.inc
|
| JSON Node Guide | JSON lifecycle, ownership, and composition patterns |
| Outbound HTTP Guide | Request client setup, callbacks, and failure handling |
| WebSocket Guide | Text/JSON websocket client usage and lifecycle |
| Callbacks | Callback signatures and runtime behavior |
| Use Cases | Practical deployment patterns and integration ideas |
| Troubleshooting | Deployment/runtime diagnostics and quick fixes |
| Capability | Supported |
|---|---|
| Inbound HTTP file upload routes | ✅ |
| Inbound custom REST endpoints | ✅ |
| Outbound HTTP text/JSON requests | ✅ |
| Outbound file uploads | ✅ |
| Outbound websocket client (text/json) | ✅ |
| Node-based JSON API | ✅ |
| TLS/HTTPS and WSS (build-dependent) | ✅ |
| WebSocket server mode | ❌ |
- Public native prefixes are
REST_*(HTTP/core) andFILE_*(file/upload). - JSON node API uses concise
Json*andRespond*helpers. - Outbound HTTP/websocket flows are asynchronous and callback-driven.
- Route authentication uses
Authorization: Bearer <token>. - Structured error codes use
PAWNREST_ERR_*. -
REST_GetHeaderlookup is case-insensitive;REST_GetQuery*reads query params from request URL target.
-
Inbound layer:
REST_Start+FILE_RegisterRoute/REST_RegisterAPIRoute. -
Data layer: request helpers (
REST_GetRequest*) + node JSON API (Json*). -
Outbound layer:
REST_CreateRequestClient,REST_Request*,REST_WebSocket*. - Integration layer: callbacks for upload, request, and websocket events.