Skip to content
New issue

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

Extend a macro-based client with new middleware for runtime usage #596

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alizain
Copy link

@alizain alizain commented Jun 9, 2023

Usage is pretty simple, helps me re-use a compile-time client with some modifications at runtime.

defmodule SomeClient do
    use Tesla

    plug ...
end

# somewhere else
[
    {Tesla.Middleware.BearerAuth, token: 1}
]
|> SomeClient.extend
|> Tesla.get!(...)

@yordis
Copy link
Member

yordis commented Jun 9, 2023

Hey there, do you mind adding unit tests to prove the use case and write documentation about it?

@alizain
Copy link
Author

alizain commented Jun 12, 2023

@yordis updated, what do you think?

@yordis
Copy link
Member

yordis commented Oct 13, 2023

See #612

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants