shared/url library

Functions

assertSameOrigin(String url, String apiUrl, String parameterName) → void
Throws unless url points at the same origin as apiUrl.
joinPath(String base, List<String> segments) String
Appends segments to base, encoding each one and collapsing the separators so a trailing slash on base cannot produce an empty path segment.