Class RemoveVersionFromURL

  • All Implemented Interfaces:
    com.google.common.base.Function<String,​String>, Function<String,​String>

    public class RemoveVersionFromURL
    extends Object
    implements com.google.common.base.Function<String,​String>
    A function that removes the API version from the tail end of a URL as well as any trailing "/". https://vcloud.test.com:2323/v2.0 would return https://vcloud.test.com:2323
    http://someurl:2321/ would return http://someurl:2321

    NOTE: This only removes the tail end of the path if it contains a version

    Author:
    Jeremy Unruh