const res = await fetch("https://xxxx.supabase.co/rest/v1/rpc/get_user_stats", {
method: "POST",
headers: {
apikey: "公開キー",
Authorization: "Bearer ログイン中のユーザーのアクセストークン",
"Content-Type": "application/json",
},
body: JSON.stringify({ user_id: 123 }),
});
const data = await res.json();