- Notifications
You must be signed in to change notification settings - Fork2
A Kotlin Multiplatform Utility Library for Uniform Resource Identifiers (URIs)
License
chRyNaN/uri
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A Kotlin Multi-platform Utility LibraryforUniform Resource Identifiers (URIs).
Uri.parse("https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top")
Consider the following Uri:https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top
Uri.fromParts( scheme="https", fragment="top", path="/forum/questions/", query="tag=networking&order=newest", userInfo="john.doe", host="www.example.com", port=123)
If an error is encountered with theUri.fromParts
function, then an exception is thrown. Instead of throwing anexception, null can be returned, using theUri.fromPartsOrNull
function.
Uri.fromPartsOrNull( scheme="https", fragment="top", path="/forum/questions/", query="tag=networking&order=newest", userInfo="john.doe", host="www.example.com", port=123)
Uri.parse(uriString="https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top")
If an error is encountered with theUri.fromString
function, then an exception is thrown. Instead of throwing anexception, null can be returned, using theUri.fromStringOrNull
function.
Uri.parseOrNull(uriString="https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top")
The library is provided throughRepsy.io. Refer tothereleases page for the latest version.
repositories { maven { url="https://repo.repsy.io/mvn/chrynan/public" }}
implementation("com.chrynan.uri:uri-core:$VERSION")
implementation("com.chrynan.uri:uri-ktor-client:$VERSION")
More detailed documentation is available in thedocs folder. The entry point to the documentation can befoundhere.
Copyright 2021 chRyNaNLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
About
A Kotlin Multiplatform Utility Library for Uniform Resource Identifiers (URIs)