Showing
1 changed file
with
7 additions
and
1 deletions
... | ... | @@ -41,10 +41,16 @@ public class RestApiCallPlugin extends AbstractPlugin<RestApiCallPluginConfigura |
41 | 41 | |
42 | 42 | @Override |
43 | 43 | public void init(RestApiCallPluginConfiguration configuration) { |
44 | + String host = configuration.getHost(); | |
45 | + host = host.trim(); | |
46 | + if (host.contains("://")) { | |
47 | + host = host.substring(host.lastIndexOf('/') + 1, host.length()); | |
48 | + } | |
49 | + | |
44 | 50 | this.baseUrl = String.format( |
45 | 51 | BASE_URL_TEMPLATE, |
46 | 52 | configuration.getProtocol(), |
47 | - configuration.getHost(), | |
53 | + host, | |
48 | 54 | configuration.getPort(), |
49 | 55 | configuration.getBasePath()); |
50 | 56 | ... | ... |