okhttp / okhttp3 / HttpUrl / pathSegments

pathSegments

fun pathSegments(): List<String>

Returns a list of path segments like ["a", "b", "c"] for the URL http://host/a/b/c. This list is never empty though it may contain a single empty string.