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

Opts not able to be passed in to http client #10

Closed
AlexanderMann opened this issue Jun 30, 2017 · 2 comments
Closed

Opts not able to be passed in to http client #10

AlexanderMann opened this issue Jun 30, 2017 · 2 comments
Assignees

Comments

@AlexanderMann
Copy link

Motivation

In debugging some production issues I came to find it necessary to be able to pass in call options for clj-http. Things like insecure?, socket-timeout, etc. I ended up pulling the logic in the http client out and calling private vars. It'd be great if I could either specify some default opts on the client itself (so as to not have to effect the top-level defprotocol) or pass them in somehow. This would probably eliminate all of the instances that I find myself having to pull the guts out of vault.http.

@greglook greglook self-assigned this Jun 30, 2017
@greglook
Copy link
Collaborator

This seems like a good improvement. 👍

@AlexanderMann
Copy link
Author

A workaround I came up with since writing this which might be more appropriate is using the with-middleware functionality present in clj-http. That ends up providing a little more flexibility, but it's definitely not as plug and play as an opt pass in.

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

No branches or pull requests

2 participants