Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Kotlin Multiplatform Utility Library for Uniform Resource Identifiers (URIs)

License

NotificationsYou must be signed in to change notification settings

chRyNaN/uri

Repository files navigation

A Kotlin Multi-platform Utility LibraryforUniform Resource Identifiers (URIs).
GitHub tag (latest by date)

Uri.parse("https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top")

Using the library

Consider the following Uri:https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top

Creating a Uri from parts:

Uri.fromParts(    scheme="https",    fragment="top",    path="/forum/questions/",    query="tag=networking&order=newest",    userInfo="john.doe",    host="www.example.com",    port=123)

Creating an optional Uri from parts:

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)

Creating a Uri from a String:

Uri.parse(uriString="https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top")

Creating an optional Uri from a String:

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")

Building

The library is provided throughRepsy.io. Refer tothereleases page for the latest version.
GitHub tag (latest by date)

Repository

repositories {    maven { url="https://repo.repsy.io/mvn/chrynan/public" }}

Dependencies

implementation("com.chrynan.uri:uri-core:$VERSION")
implementation("com.chrynan.uri:uri-ktor-client:$VERSION")

Documentation

More detailed documentation is available in thedocs folder. The entry point to the documentation can befoundhere.

License

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.

[8]ページ先頭

©2009-2025 Movatter.jp