Open house9 opened 2 years ago
Is it possible to specify a different authorization header per request?
I have a server side api (NestJS) that makes calls to another jsonapi service and I was hoping to use Spraypaint to simplify those requests.
The current implementation seems to assume this is running in a browser and uses static methods to set the authorization header.
Everything works great calling external api except the auth methods are static.
This works but seems very unsafe
Widget.setJWT(token); const widgets = Widget.per(10).all(); Widget.setJWT("");
Is there another way to handle this scenario with Spraypaint?
Is it possible to specify a different authorization header per request?
I have a server side api (NestJS) that makes calls to another jsonapi service and I was hoping to use Spraypaint to simplify those requests.
The current implementation seems to assume this is running in a browser and uses static methods to set the authorization header.
Everything works great calling external api except the auth methods are static.
This works but seems very unsafe
Is there another way to handle this scenario with Spraypaint?