Commit b562e8ed1505be255b62e6ed049c424dadaea4f0

Authored by Dmytro Landiak
1 parent f7d4cf96

improved URI scheme support

... ... @@ -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
... ...