Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1016 Bytes

url.md

File metadata and controls

56 lines (36 loc) · 1016 Bytes
permalink
/url/

url

local url = import "github.com/jsonnet-libs/xtd/url.libsonnet"

url provides functions to deal with URLs

Index

Fields

fn encodeQuery

encodeQuery(params)

encodeQuery takes an object of query parameters and returns them as an escaped key=value string

fn escapeString

escapeString(str, excludedChars=[])

escapeString escapes the given string so it can be safely placed inside an URL, replacing special characters with %XX sequences

fn join

join(splitObj)

join joins URLs from the object generated from parse

fn parse

parse(url)

parse parses absolute and relative URLs.

:///;parameters?#

Inspired by Python's urllib.urlparse, following several RFC specifications.