We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
query
createFetch()
schema
In my case, the OMDb API required an apikey query param passed in every request so I set up my createFetch like so:
apikey
createFetch
export const omdbApi = createFetch({ baseURL: 'http://www.omdbapi.com', query: { apikey: 'xxxxxxxx', }, schema: createSchema( { '/': { query: z.object({ i: z.string(), }), }, }, ), });
However, when calling the API like so
omdbApi('/', { query: { i: 'tt22022452'} })
only the i query param gets sent.
i
The text was updated successfully, but these errors were encountered:
I think you can use the onRequest hook.
Docs: https://better-fetch.vercel.app/docs/hooks#on-request 🤟
Sorry, something went wrong.
No branches or pull requests
In my case, the OMDb API required an
apikey
query param passed in every request so I set up mycreateFetch
like so:However, when calling the API like so
only the
i
query param gets sent.The text was updated successfully, but these errors were encountered: