You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @theduke, thank you 😄 Sorry if I didn't reply earlier.
ATM you can make the auth headers part of the struct that implements the Api trait,
but I see that it's not a nice solution, and it could create a lot of duplicate code.
I'd like to keep this issue open a try to find a good solution. One option could be transforming the Api into a sort of prototype that you can clone and customise every time, so if you need to reuse the same request several times with different headers, you can reuse part of the existing request. I'll look into it to see if it's a suitable solution.
With this change, if you have an api request req you can use the method transform to create a request based on req that adds the header Authentication.
This library is a very cool idea.
One thing I would not know how to express: modifications that need to be made for each request, for example adding an
Authentication
header.Any ideas how to express that smoothly?
The text was updated successfully, but these errors were encountered: