You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 27, 2023. It is now read-only.
I try to create a new Consul object using the Consul.builder().withUrl(urlString);
The urlString has the following pattern:
https://<IP>/path/to/consul
If i build my object using build(), the createRetrofit() Method is executed.
Within this method, my given URL will be cutted/modified to https://<IP>/v1 instead of https://<IP>/path/to/consul/v1
This leads to a 404 and the Consul API is not reachable.
Is there a reason for this? I tried to change the Code in Consul.java to the following:
return new Retrofit.Builder()
// new way
.baseUrl(consulUrl.toExternalForm() + "/v1/")
// old way
// .baseUrl(new URL(consulUrl.getProtocol(), consulUrl.getHost(),
// consulUrl.getPort(), "/v1/").toExternalForm())
.addConverterFactory(JacksonConverterFactory.create(mapper))
.client(builder.build())
.build();
This works fine for me. But i don't think its a solution for all possible use cases.
The text was updated successfully, but these errors were encountered:
Hi,
i'm currently facing the following issue:
I try to create a new Consul object using the
Consul.builder().withUrl(urlString);
The urlString has the following pattern:
https://<IP>/path/to/consul
If i build my object using
build()
, thecreateRetrofit()
Method is executed.Within this method, my given URL will be cutted/modified to
https://<IP>/v1
instead ofhttps://<IP>/path/to/consul/v1
This leads to a 404 and the Consul API is not reachable.
Is there a reason for this? I tried to change the Code in Consul.java to the following:
This works fine for me. But i don't think its a solution for all possible use cases.
The text was updated successfully, but these errors were encountered: