update to tcnative 2.0.52

This commit is contained in:
Jörg Prante 2022-06-17 17:42:45 +02:00
parent f0b4b251e4
commit d93c79fa63
4 changed files with 31 additions and 5 deletions

View file

@ -1,12 +1,9 @@
package org.xbib.netty.http.client.test.http1;
import io.netty.handler.codec.http.HttpHeaderValues;
import io.netty.handler.codec.http.HttpMethod;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.xbib.netty.http.client.Client;
import org.xbib.netty.http.client.api.Request;
import org.xbib.netty.http.client.test.NettyHttpTestExtension;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@ -14,7 +11,6 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
@ExtendWith(NettyHttpTestExtension.class)
class Http1Test {
private static final Logger logger = Logger.getLogger(Http1Test.class.getName());

View file

@ -0,0 +1,29 @@
package org.xbib.netty.http.client.test.http2;
import java.nio.charset.StandardCharsets;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.junit.jupiter.api.Test;
import org.xbib.netty.http.client.Client;
import org.xbib.netty.http.client.api.Request;
public class XbibTest {
private static final Logger logger = Logger.getLogger(XbibTest.class.getName());
@Test
void testXbib() throws Exception {
try (Client client = Client.builder()
.enableDebug()
.build()) {
Request request = Request.get()
.url("https://xbib.org/")
.setVersion("HTTP/2.0")
.setResponseListener(resp -> logger.log(Level.INFO, "got HTTP/2 response: " +
resp.getHeaders() + resp.getBodyAsString(StandardCharsets.UTF_8)))
.build();
client.execute(request).get().close();
}
}
}

View file

@ -6,3 +6,4 @@ java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.FileHandler.level=ALL
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.FileHandler.pattern=build/test.log
jdk.event.security.level=INFO

View file

@ -14,7 +14,7 @@ dependencyResolutionManagement {
version('spock', '2.0-groovy-3.0')
version('junit', '5.8.2')
version('netty', '4.1.77.Final')
version('netty-tcnative', '2.0.51.Final')
version('netty-tcnative', '2.0.52.Final')
library('groovy-core', 'org.codehaus.groovy', 'groovy').versionRef('groovy')
library('spock-core', 'org.spockframework', 'spock-core').versionRef('spock')
library('spock-junit4', 'org.spockframework', 'spock-junit4').versionRef('spock')