Skip to content

Proxied Feign's Client implementation [Tested]#800

Closed
herrhilmi wants to merge 1 commit into
OpenFeign:masterfrom
herrhilmi:master
Closed

Proxied Feign's Client implementation [Tested]#800
herrhilmi wants to merge 1 commit into
OpenFeign:masterfrom
herrhilmi:master

Conversation

@herrhilmi

@herrhilmi herrhilmi commented Sep 28, 2018

Copy link
Copy Markdown

Avoid messing with OkHttp dependecies to add proxied implementation.

@kdavisk6

Copy link
Copy Markdown
Member

Thank you for your PR. Can you please create an issue explaining what problem you are having and what the expected outcome of this change should be. That will help provide the context we need to review this properly.

@kdavisk6 kdavisk6 added waiting for feedback Issues waiting for a response from either to the author or other maintainers needs info Information is either missing or incomplete. labels Sep 28, 2018
@herrhilmi

Copy link
Copy Markdown
Author

I've created this issue #801
should i push another PR ?

@kdavisk6

kdavisk6 commented Oct 2, 2018

Copy link
Copy Markdown
Member

No, that won't be necessary.

@kdavisk6 kdavisk6 added waiting for votes Enhancements or changes proposed that need more support before consideration and removed waiting for feedback Issues waiting for a response from either to the author or other maintainers labels Oct 2, 2018
@velo

velo commented Oct 23, 2018

Copy link
Copy Markdown
Member

What I would really like to see was an unit test =)

@herrhilmi

Copy link
Copy Markdown
Author

Yes, you'are absolutely right. I'll try to add some 👍

@velo

velo commented Nov 4, 2018

Copy link
Copy Markdown
Member

Would also be nice to have this rebased with master

@kdavisk6

Copy link
Copy Markdown
Member

@herrhilmi If you could add some tests, I think this PR is in good shape to be accepted.

@herrhilmi

Copy link
Copy Markdown
Author

Ok, I will try to fix this asap

@kdavisk6

Copy link
Copy Markdown
Member

Thinking about this more, I suggest that, instead of modifying the existing default client, we provide a a ProxyClient implementation, allowing users to choose which targets should use a proxy and which should not.

Any thoughts?

@velo

velo commented Aug 6, 2019

Copy link
Copy Markdown
Member

Thinking about this more, I suggest that, instead of modifying the existing default client, we provide a a ProxyClient implementation, allowing users to choose which targets should use a proxy and which should not.

There is a Default and a Proxied implementation.

Do you think that covers your request?

The only thing I'm really missing is some testing.

@kdavisk6

kdavisk6 commented Aug 7, 2019

Copy link
Copy Markdown
Member

@velo

My concern is that Default was changed to accommodate Proxy by updating the convertAndSend method to accept a Proxy. I would prefer that the Proxy Client be separated more. For example:

final boolean useProxy = proxy != null;
final URL url = new URL(request.url());  
final HttpURLConnection connection =  (HttpURLConnection) (useProxy ? url.openConnection(proxy) : url.openConnection());

is in Default, creating a dependency on the proxy flag for all cases. I would prefer this logic be isolated into the Proxy client. To be even more specific, here is what I would like to see here:

  • Revert changes to Default client
  • Isolate Proxy usage to the Proxy client only
  • Unit Tests for the Proxy client added.

@kdavisk6 kdavisk6 added feedback provided Feedback has been provided to the author enhancement For recommending new capabilities and removed waiting for votes Enhancements or changes proposed that need more support before consideration needs info Information is either missing or incomplete. labels Aug 7, 2019
@kdavisk6

Copy link
Copy Markdown
Member

Replaced by #1045

@kdavisk6 kdavisk6 closed this Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement For recommending new capabilities feedback provided Feedback has been provided to the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants