o
odinpkg.dev
packages / library / odin_uri

odin_uri

507e666library

A port of Go's net/url package to Odin

No license · updated 1 year ago

What is this

RFC 3986 is the standard for defining Uniform Resource Identifiers (a.k.a URIs, URLs)

This package is an implementation for Odin as a port of the Go language net/url package.

Example

package example

import "core:fmt"
import "uri"

main :: proc() {
	identifier, ok := uri.parse("https://github.com/Creativty/odin_uri?w=1#example")
	assert(ok)

	fmt.println(identifier.scheme)   // "https"
	fmt.println(identifier.host)     // "github.com"
	fmt.println(identifier.path)     // "/Creativty/odin_uri"
	fmt.println(identifier.query)    // "w=1"
	fmt.println(identifier.fragment) // "example"
}