Skip to content

Introduced java 11 module with http2 client - #806

Merged
velo merged 3 commits into
OpenFeign:masterfrom
velo:http2
Oct 13, 2018
Merged

velo merged 3 commits into
OpenFeign:masterfrom
velo:http2

Conversation

@velo

@velo velo commented Oct 6, 2018

Copy link
Copy Markdown
Member

I had an old project (https://github.com/velo/feign-java9) with new java http2 client...

Now that java 11 is out and client api is better defined... it would be a good time to include support onto feign

@velo
velo requested a review from kdavisk6 October 6, 2018 03:18
@velo
velo force-pushed the http2 branch 2 times, most recently from dcbdeb2 to 9c08600 Compare October 6, 2018 04:04

@kdavisk6 kdavisk6 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@velo, A few notes on documentation and some questions for clarity.

import feign.Request.Options;
import feign.Response;

public class JavaHttp2Client implements Client {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to have Java in the name. Can you rename it to Http2Client?

Comment thread .travis.yml
matrix:
include:
- os: linux
jdk: oraclejdk8

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also consider changing this to the openjdk?

Comment thread pom.xml Resolved
public void testPatch() throws Exception {
TestInterface api = newBuilder().target(TestInterface.class, "https://nghttp2.org/httpbin/");
Assertions.assertThat(api.patch(""))
.contains("https://nghttp2.org/httpbin/patch");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this make a real call? Is there a way we can mock this out to prevent builds from failing due to network or host issues?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to be sure it was hitting an http2 server....
No network in general means no build for maven =)

Do you know any http2 mocks?

/**
* @see jdk.internal.net.http.common.Utils.DISALLOWED_HEADERS_SET
*/
private static final Set<String> DISALLOWED_HEADERS_SET;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add another comment about why these headers are disallowed?

Comment thread java11/README.md Outdated
@@ -0,0 +1,11 @@
# feign-java1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo. Should be feign-java11

@kdavisk6 kdavisk6 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 small documentation changes, then feel free to merge

Comment thread README.md Outdated

```java
GitHub github = Feign.builder()
.client(new JavaHttp2Client())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we changed the name of the Client, we need to update this :)

Comment thread java11/README.md Resolved
Comment thread pom.xml Resolved
@velo
velo merged commit 6acbe94 into OpenFeign:master Oct 13, 2018
@velo
velo deleted the http2 branch October 13, 2018 20:39
@kdavisk6 kdavisk6 added this to the 10.1.0 milestone Oct 14, 2018
@velo velo mentioned this pull request Oct 19, 2018
velo added a commit that referenced this pull request Oct 7, 2024
* Introduced java 11 module with http2 client
velo added a commit that referenced this pull request Oct 8, 2024
* Introduced java 11 module with http2 client
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

Successfully merging this pull request may close these issues.

2 participants