useSanctumFetch
Last updated
Last updated
Besides useSanctumClient
you can directly send a request by using a module-specific version of fetch composable - useSanctumFetch
.
This composable implements a similar interface to useFetch
, so you can check more details .
Composable accepts 3 arguments:
endpoint URL to call
FetchOptions
to pass to the client (ofetch
)
AsyncDataOptions
to pass to useAsyncData
under the hood
You can also use type casting to work with response as an interface: