with a backend server action:
'use server';
export async function createEntity(v: string, n: number, o: boolean){
///
return {success: true, val: x};
}
- we cannot modify response headers (add metadata)
- cannot log response status code or automatically log response body as json
likewise on the client:
'use client';
useEffect(async () => {
const result = await createEntity('foo', 69, true);
},[]);
- we cannot add metadata to the request - we cannot modify request headers using fetch
- aka, I want to pass a unique uuid as a header to represent the reuqest id, etc
looking for a way to hook into server actions for both client and server for these reasons