The endpoint name (e.g., 'grasshopper', 'io'). Determines the response type for better type safety.
The Compute API endpoint (e.g., 'grasshopper', 'io', 'mesh').
Pre-prepared arguments for the request body.
Compute configuration (server URL, API key, timeout, debug).
The parsed JSON response from the server, typed according to the endpoint.
// Basic usage for the Grasshopper endpoint:
const response = await fetchRhinoCompute(
'grasshopper',
{
pointer: { url: 'https://example.com/definition.gh' },
values: [{ ParamName: 'x', InnerTree: { '0': [{ type: 'System.Double', data: 10 }] } }]
},
{ serverUrl: 'https://my-server.com', debug: true, timeoutMs: 30000 }
);
Generic Rhino Compute fetch function. Sends a POST request to any Compute endpoint with pre-prepared arguments.
Use this for advanced, low-level control over compute requests. For most use cases, prefer higher-level APIs.