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

Is it possible to add Tesla.Middleware.Logger to my requests? #73

Closed
axelcxyz opened this issue Jun 9, 2023 · 2 comments
Closed

Is it possible to add Tesla.Middleware.Logger to my requests? #73

axelcxyz opened this issue Jun 9, 2023 · 2 comments

Comments

@axelcxyz
Copy link

axelcxyz commented Jun 9, 2023

I'd like to add Tesla.Middleware.Logger to the client when making requests. Is that possible?

It doesn't look like ExForce.Client.Tesla.build_client/2 supports it:

def build_client(instance_url_or_map, opts \\ [headers: [{"user-agent", @default_user_agent}]])

I was also looking into whether I could add the Middleware to the client after I get it back, but I couldn't find a way to modify a Tesla.Client after it is built.

Thanks!

@axelcxyz
Copy link
Author

axelcxyz commented Jun 9, 2023

I see there is an open pull request for this:

#71

@axelcxyz axelcxyz closed this as completed Jun 9, 2023
@axelcxyz
Copy link
Author

axelcxyz commented Jun 9, 2023

I ended up using this approach: #42 (comment)

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

No branches or pull requests

1 participant