cactoos-http
cactoos-http copied to clipboard
HTTP/2 support
Does cactoos-http designed to support HTTP/2 protocol? If yes how does it share sockets (or clients) across requests?
@g4s8 that's a good question. Yes, we should support HTTP/2. Let's think how to do that right.
@yegor256 looks like it can be HtWire implementation, e.g.:
try (final HtWire http2 = new Http2Wire("example.com")) {
new HtResponse(
http2,
new JoinedText(
"\n\r"
"GET / HTTP/2",
"Host: www.example.com"
)
);
}
also it can be helpful to see how it's implemented in other clients: https://github.com/square/okhttp/blob/master/okhttp/src/main/java/okhttp3/internal/http2/Http2Connection.java
@g4s8 @yegor256 I have no idea how HTTP/2 works
@g4s8 can you implement a small, initial step in the right direction?
@llorllale sure I'll have a look later
@g4s8 you want this task?
@llorllale yes, please assign me
@0crat assign @g4s8
@0crat assign @g4s8 (here)
@llorllale The job #2 assigned to @g4s8/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this @g4s8/z is not a member of this project yet, but they can request to join, as §1 explains
It is strongly discouraged to assign jobs to their creators, see §19: -15 point(s) just awarded to @llorllale/z
@0crat refuse
@0crat refuse (here)
@llorllale The user @g4s8/z resigned from #2, please stop working. Reason for job resignation: Order was cancelled
The job #2 assigned to @ilyakharlamov/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job
@0crat refuse ALPN is required for HTTP/2, but it isn’t available in Java until JDK 9. OkHttp and other clients also require either Java 9 or hacked boot classes from Java 9. Since this project is Java 8 (see pom.xml), sane implementation is not possible without JDK switching.
Are you speaking to me or about me here; you must always start your message with my name if you want to address it to me, see §1
@0crat refuse
@0crat refuse (here)
@ilyakharlamov The user @ilyakharlamov/z resigned from #2, please stop working. Reason for job resignation: Order was cancelled
The job #2 assigned to @borysfan/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job
@0crat refuse
@0crat refuse (here)
@llorllale The user @borysfan/z resigned from #2, please stop working. Reason for job resignation: Order was cancelled
The job #2 assigned to @mazdack/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job