This covers the client-side Fetch handler. There’s also a server-specific Fetch plugin available to use.
Prim+RPC supports the Fetch API as implemented in all modern browsers.
Your endpoint may look different depending on your server selection. Check with your server for the correct endpoint.
You may also add types to your client by passing them as a type argument to the client. Always ensure that only types are passed to the client, not the module itself.
The imported types given here is an example and your import will depend on where your types are exported from the server.
Now you may use this client anywhere in your project:
You may also choose a compatible method handler:
Report an Issue