improved URI scheme support
This commit is contained in:
parent
f7d4cf9639
commit
b562e8ed15
@ -41,10 +41,16 @@ public class RestApiCallPlugin extends AbstractPlugin<RestApiCallPluginConfigura
|
||||
|
||||
@Override
|
||||
public void init(RestApiCallPluginConfiguration configuration) {
|
||||
String host = configuration.getHost();
|
||||
host = host.trim();
|
||||
if (host.contains("://")) {
|
||||
host = host.substring(host.lastIndexOf('/') + 1, host.length());
|
||||
}
|
||||
|
||||
this.baseUrl = String.format(
|
||||
BASE_URL_TEMPLATE,
|
||||
configuration.getProtocol(),
|
||||
configuration.getHost(),
|
||||
host,
|
||||
configuration.getPort(),
|
||||
configuration.getBasePath());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user