move to https on xbib.org
This commit is contained in:
parent
635f3a62e9
commit
51f2cd1898
5 changed files with 17 additions and 17 deletions
|
@ -1,11 +1,11 @@
|
||||||
group = org.xbib
|
group = org.xbib
|
||||||
name = netty-http
|
name = netty-http
|
||||||
version = 4.1.53.1
|
version = 4.1.54.1
|
||||||
|
|
||||||
gradle.wrapper.version = 6.6.1
|
gradle.wrapper.version = 6.6.1
|
||||||
netty.version = 4.1.53.Final
|
netty.version = 4.1.54.Final
|
||||||
tcnative.version = 2.0.34.Final
|
tcnative.version = 2.0.34.Final
|
||||||
bouncycastle.version = 1.66
|
bouncycastle.version = 1.67
|
||||||
reactivestreams.version = 1.0.2
|
reactivestreams.version = 1.0.2
|
||||||
reactivex.version = 1.3.8
|
reactivex.version = 1.3.8
|
||||||
conscrypt.version = 2.5.1
|
conscrypt.version = 2.5.1
|
||||||
|
@ -15,5 +15,5 @@ mockito.version = 3.4.4
|
||||||
xbib.net.version = 2.1.0
|
xbib.net.version = 2.1.0
|
||||||
xbib-guice.version = 4.4.2
|
xbib-guice.version = 4.4.2
|
||||||
# uuhh, too many tests to update to jupiter in rx...
|
# uuhh, too many tests to update to jupiter in rx...
|
||||||
junit.version = 5.6.2
|
junit.version = 5.7.0
|
||||||
junit4.version = 4.13
|
junit4.version = 4.13
|
||||||
|
|
|
@ -13,7 +13,7 @@ class RestClientTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testSimpleGet() throws IOException {
|
void testSimpleGet() throws IOException {
|
||||||
String result = RestClient.get("http://xbib.org").asString();
|
String result = RestClient.get("https://xbib.org").asString();
|
||||||
logger.info(result);
|
logger.info(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ class SimpleHttp1Test {
|
||||||
void testHttp1() throws Exception {
|
void testHttp1() throws Exception {
|
||||||
Client client = new Client();
|
Client client = new Client();
|
||||||
try {
|
try {
|
||||||
HttpTransport transport = client.newTransport("xbib.org", 80);
|
HttpTransport transport = client.newTransport("google.de", 80);
|
||||||
transport.onResponse(msg -> logger.log(Level.INFO,
|
transport.onResponse(msg -> logger.log(Level.INFO,
|
||||||
"got response: " + msg.status().code() + " headers=" + msg.headers().entries()));
|
"got response: " + msg.status().code() + " headers=" + msg.headers().entries()));
|
||||||
transport.connect();
|
transport.connect();
|
||||||
|
@ -92,7 +92,7 @@ class SimpleHttp1Test {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private AttributeKey<HttpTransport> TRANSPORT_ATTRIBUTE_KEY = AttributeKey.valueOf("transport");
|
private final AttributeKey<HttpTransport> TRANSPORT_ATTRIBUTE_KEY = AttributeKey.valueOf("transport");
|
||||||
|
|
||||||
interface ResponseWriter {
|
interface ResponseWriter {
|
||||||
void write(FullHttpResponse msg);
|
void write(FullHttpResponse msg);
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Http1Test {
|
||||||
Client client = Client.builder()
|
Client client = Client.builder()
|
||||||
.build();
|
.build();
|
||||||
try {
|
try {
|
||||||
Request request = Request.get().url("http://xbib.org")
|
Request request = Request.get().url("https://xbib.org")
|
||||||
.setResponseListener(resp -> logger.log(Level.FINE,
|
.setResponseListener(resp -> logger.log(Level.FINE,
|
||||||
"got response: " + resp.getHeaders() +
|
"got response: " + resp.getHeaders() +
|
||||||
resp.getBodyAsString(StandardCharsets.UTF_8) +
|
resp.getBodyAsString(StandardCharsets.UTF_8) +
|
||||||
|
@ -39,7 +39,7 @@ class Http1Test {
|
||||||
Client client = Client.builder()
|
Client client = Client.builder()
|
||||||
.build();
|
.build();
|
||||||
try {
|
try {
|
||||||
Request request1 = Request.get().url("http://xbib.org")
|
Request request1 = Request.get().url("https://xbib.org")
|
||||||
.setResponseListener(resp -> logger.log(Level.FINE, "got response: " +
|
.setResponseListener(resp -> logger.log(Level.FINE, "got response: " +
|
||||||
resp.getBodyAsString(StandardCharsets.UTF_8)))
|
resp.getBodyAsString(StandardCharsets.UTF_8)))
|
||||||
.build();
|
.build();
|
||||||
|
@ -60,12 +60,12 @@ class Http1Test {
|
||||||
.build();
|
.build();
|
||||||
try {
|
try {
|
||||||
Request request1 = Request.builder(HttpMethod.GET)
|
Request request1 = Request.builder(HttpMethod.GET)
|
||||||
.url("http://xbib.org").setVersion("HTTP/1.1")
|
.url("https://xbib.org").setVersion("HTTP/1.1")
|
||||||
.setResponseListener(resp -> logger.log(Level.FINE, "got response: " +
|
.setResponseListener(resp -> logger.log(Level.FINE, "got response: " +
|
||||||
resp.getHeaders() + " status=" +resp.getStatus()))
|
resp.getHeaders() + " status=" +resp.getStatus()))
|
||||||
.build();
|
.build();
|
||||||
Request request2 = Request.builder(HttpMethod.GET)
|
Request request2 = Request.builder(HttpMethod.GET)
|
||||||
.url("http://xbib.org").setVersion("HTTP/1.1")
|
.url("https://xbib.org").setVersion("HTTP/1.1")
|
||||||
.setResponseListener(resp -> logger.log(Level.FINE, "got response: " +
|
.setResponseListener(resp -> logger.log(Level.FINE, "got response: " +
|
||||||
resp.getHeaders() + " status=" +resp.getStatus()))
|
resp.getHeaders() + " status=" +resp.getStatus()))
|
||||||
.build();
|
.build();
|
||||||
|
|
|
@ -22,7 +22,7 @@ class XbibTest {
|
||||||
void testXbibOrgWithDefaults() throws IOException {
|
void testXbibOrgWithDefaults() throws IOException {
|
||||||
Client client = new Client();
|
Client client = new Client();
|
||||||
try {
|
try {
|
||||||
Request request = Request.get().url("http://xbib.org")
|
Request request = Request.get().url("https://xbib.org")
|
||||||
.setResponseListener(resp -> {
|
.setResponseListener(resp -> {
|
||||||
logger.log(Level.INFO, "status = " + resp.getStatus() +
|
logger.log(Level.INFO, "status = " + resp.getStatus() +
|
||||||
" response = " + resp.getBodyAsString(StandardCharsets.UTF_8));
|
" response = " + resp.getBodyAsString(StandardCharsets.UTF_8));
|
||||||
|
@ -42,7 +42,7 @@ class XbibTest {
|
||||||
try {
|
try {
|
||||||
final Function<HttpResponse, String> stringFunction =
|
final Function<HttpResponse, String> stringFunction =
|
||||||
response -> response.getBodyAsString(StandardCharsets.UTF_8);
|
response -> response.getBodyAsString(StandardCharsets.UTF_8);
|
||||||
Request request = Request.get().url("http://xbib.org")
|
Request request = Request.get().url("https://xbib.org")
|
||||||
.build();
|
.build();
|
||||||
final CompletableFuture<String> completableFuture = httpClient.execute(request, stringFunction)
|
final CompletableFuture<String> completableFuture = httpClient.execute(request, stringFunction)
|
||||||
.exceptionally(Throwable::getMessage)
|
.exceptionally(Throwable::getMessage)
|
||||||
|
@ -73,7 +73,7 @@ class XbibTest {
|
||||||
.build();
|
.build();
|
||||||
try {
|
try {
|
||||||
httpClient.execute(Request.get()
|
httpClient.execute(Request.get()
|
||||||
.url("http://xbib.org")
|
.url("https://xbib.org")
|
||||||
.setResponseListener(resp -> logger.log(Level.INFO, "status = " + resp.getStatus() +
|
.setResponseListener(resp -> logger.log(Level.INFO, "status = " + resp.getStatus() +
|
||||||
" response body = " + resp.getBodyAsString(StandardCharsets.UTF_8)))
|
" response body = " + resp.getBodyAsString(StandardCharsets.UTF_8)))
|
||||||
.build())
|
.build())
|
||||||
|
@ -89,7 +89,7 @@ class XbibTest {
|
||||||
.build();
|
.build();
|
||||||
try {
|
try {
|
||||||
httpClient.execute(Request.get()
|
httpClient.execute(Request.get()
|
||||||
.url("http://xbib.org")
|
.url("https://xbib.org")
|
||||||
.setTimeoutInMillis(10)
|
.setTimeoutInMillis(10)
|
||||||
.setResponseListener(resp ->
|
.setResponseListener(resp ->
|
||||||
logger.log(Level.INFO, "status = " + resp.getStatus() +
|
logger.log(Level.INFO, "status = " + resp.getStatus() +
|
||||||
|
@ -107,7 +107,7 @@ class XbibTest {
|
||||||
try {
|
try {
|
||||||
httpClient.execute(Request.get()
|
httpClient.execute(Request.get()
|
||||||
.setVersion("HTTP/1.1")
|
.setVersion("HTTP/1.1")
|
||||||
.url("http://xbib.org")
|
.url("https://xbib.org")
|
||||||
.setResponseListener(resp -> {
|
.setResponseListener(resp -> {
|
||||||
logger.log(Level.INFO, "status = " + resp.getStatus() +
|
logger.log(Level.INFO, "status = " + resp.getStatus() +
|
||||||
" response body = " + resp.getBodyAsString(StandardCharsets.UTF_8));
|
" response body = " + resp.getBodyAsString(StandardCharsets.UTF_8));
|
||||||
|
@ -116,7 +116,7 @@ class XbibTest {
|
||||||
.get();
|
.get();
|
||||||
httpClient.execute(Request.get()
|
httpClient.execute(Request.get()
|
||||||
.setVersion("HTTP/1.1")
|
.setVersion("HTTP/1.1")
|
||||||
.url("http://xbib.org")
|
.url("https://xbib.org")
|
||||||
.setResponseListener(resp -> {
|
.setResponseListener(resp -> {
|
||||||
logger.log(Level.INFO, "status = " + resp.getStatus() +
|
logger.log(Level.INFO, "status = " + resp.getStatus() +
|
||||||
" response body = " + resp.getBodyAsString(StandardCharsets.UTF_8));
|
" response body = " + resp.getBodyAsString(StandardCharsets.UTF_8));
|
||||||
|
|
Loading…
Reference in a new issue