Add support for constructing custom proxy routing.#81
Conversation
- Modified `->ProxySelector` to take a vector of handlers and proxy parameters in addition to the "simple" host/port config argument. - Added functions to construct handler/proxy pairs. - Added some tests for proxy selection - Updated changelog.
|
My initial reaction: why would we pass a vector of functions? I think we can cover all use cases with just one function right? |
|
I'll give it a go and see how the one-function interface would look. |
|
What I mean is, one could write all the conditions basically as one function with a |
|
Feebdack: It seems The default client has a behavior change now, it will suddenly respect env vars. I think this should be opt-in since this is breaking. Since java.net.http doesn't respect env vars by default, I think we should just expose a function for this. Maybe we could do this as a second PR as to not make this PR contain too many features at once. |
|
Good points, I'll split the "default proxy" behavior into its own pull request and add the "passthrough" case. |
|
This is done now. |
|
It helps to actually run the tests, fixed the test error. |
->ProxySelectorto take a vector of handlers and proxy parameters in addition to the "simple" host/port config argument.Please answer the following questions and leave the below in as part of your PR.
I have read the developer documentation.
This PR corresponds to an issue with a clear problem statement.
This PR contains a test to prevent against future regressions
I have updated the CHANGELOG.md file with a description of the addressed issue.