bootgs-client
Installation
SKILL.md
Bootgs Client
Available files
assets/gas-http-client.ts— a workingcallBootgsApi()client built ongoogle.script.run(see below). Copy it in and adapt.
Why this exists
A bootgs controller method is triggered by GAS calling the native doGet(event)/doPost(event) globals — GAS hands you an event object shaped by its own trigger system, not a URL and HTTP method your fetch call understands. bootgs's RequestFactory reconstructs an HttpRequest (method, pathname, query, body) out of that native event. The Virtual Transport Layer is the convention for what to put into the event so that reconstruction resolves to the route you intend. There is no bootgs-provided client — you build the caller side yourself, against this contract.
The contract
| Field | Where it comes from | Notes |
|---|---|---|
method |
a method parameter (GET, POST, PUT, DELETE, ...) |
This is virtual — GAS itself only ever actually invokes doGet or doPost. method tells the router which route to match, independent of which GAS global fired. |
pathname (or path) |
a pathname/path parameter |
Must include the apiPrefix your app was configured with (default "/api") — see bootgs-quickstart. Route placeholders ({id}) must already be substituted with real values; the router does not template on the client's behalf. |
| query params | plain key/value entries in the event's parameter/parameters map |
Same map that carries method/pathname — GAS doesn't distinguish "framework" params from "your" params, they're all just query-string-derived key/values. |
| body | postData.contents (string) + postData.type |
Only present on doPost. Send a JSON string and set postData.type to bootgs's ContentMimeType.JSON so the body is parsed rather than treated as opaque text. |
| headers | not natively supported | GAS triggers don't carry HTTP headers. If you need to pass metadata that isn't a query param or body field, JSON-stringify it into a headers parameter — this is a workaround, not a real header channel. |