rubber-blueR
Refine3y ago
3 replies
rubber-blue

How do I pass an authorization header to @pankod/refine-simple-rest for API calls

Hello I am trying to use the @pankod/refine-simple-rest data provider, and the API endpoint requires the use of an Authorization header. Do I need to write a new provider or is there some way to monkey patch the axios instance inside the provider? Where would be the best place to do this?

https://github.com/refinedev/refine/blob/next/packages/simple-rest/src/provider.ts

I need something like: { headers: {"Authorization" : Bearer ${tokenStr}}
GitHub
Build your React-based CRUD applications, without constraints. - refine/provider.ts at next · refinedev/refine
refine/provider.ts at next · refinedev/refine
Was this page helpful?