Installation
Add InsForge to your Swift Package Manager dependencies:Enable Logging (Optional)
For debugging, you can configure the SDK log level and destination:
Log Destinations:
Use
.info or .error in production to avoid exposing sensitive data in logs.Currently, InsForge only supports JavaScript/TypeScript functions running in a Deno environment.
invoke()
Invoke a serverless function by slug.Parameters
slug(String) - Function slug/namebody([String: Any], optional) - Request body as dictionary
Overloads
Theinvoke method has three overloads:
-
With dictionary body, returning typed response
-
With Encodable body, returning typed response
-
Without expecting response body
SDK automatically includes authentication token from logged-in user.