Overview
hit
is a helper function as a wrapper for the fetch
function in the browser. The benefit of using this is that it will automatically handle unauthenticated responses by fetching a new access token using the refresh token.
How to Use
All the parameters are the same as the native fetch
function. Here's an example of how to use it:
ts
ā
It will automatically include the credentials: 'include'
option to send cookies for authentication.