uri

Generated by tinox doc

tinox.core.uri, bundled with the compiler and also available as a standalone tinox-central package.

Parse and encode

import tinox.core.uri
class Main
{
    fnc main() -> Int32
    {
        const parts: UriParts = Uri::parse("https://example.com/search?q=tinox+lang#top")
        println(parts.scheme)
        println(parts.host)
        println(parts.path)
        println(parts.query)
        println(parts.fragment)
        const encoded: String = Uri::encodeComponent("hello world & more")
        println(encoded)
        println(Uri::decodeComponent(encoded))
        return 0
    }
}

fn tinoxBytesToString(bytes: List<Int64>) → String

class Uri

Methods

fn isUnreserved(code: Int64) → Bool
fn isReserved(code: Int64) → Bool
fn hexDigit(n: Int64) → String
fn percentEncodeByte(code: Int64) → String
fn hexValue(c: String) → Int64
fn encodeComponent(s: String) → String
fn encode(s: String) → String
fn decodeComponent(s: String) → String
fn decode(s: String) → String
fn parse(url: String) → UriParts

class UriParts

Fields

schemeString
hostString
pathString
queryString
fragmentString