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

Supporting Excon #153

Open
stiak opened this issue Sep 20, 2017 · 0 comments
Open

Supporting Excon #153

stiak opened this issue Sep 20, 2017 · 0 comments

Comments

@stiak
Copy link
Contributor

stiak commented Sep 20, 2017

I'd like to add support for https://github.com/excon/excon, but it doesn't follow the current model of having a request object to decorate. Instead it uses a parameter hash to pass through headers, body, request method, etc.

It seems less than ideal to map any instance of a hash passed to ApiAuth to an excon request driver.

Excon does support middleware, so I was thinking I could build a middleware, then an class that wrapped the params hash, then support mapping that to an excon request driver. So approximately three new classes. I think ApiAuth is the right home for those classes.

I can create a PR to demonstrate the change, but it would mean for excon support people would have to add the middleware rather than call sign directly.

Is that the right approach? Any other suggestions?

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