Inherited from v1.0.0

url মডিউল

URL পার্স ও বানান, percent-escape encode/decode, query parameter serialize।

import "url" as url;

var u = url.parse("https://example.com:8080/path?q=hello+world&n=42");
print(u.scheme, u.host, u.port, u.path, u.query.q);

print(url.encode("hello world"));    // hello%20world
print(url.build_query({ q: "hi", n: 1 }));  // q=hi&n=1

API

ফাংশনবর্ণনা
url.parse(s) → map{scheme, user, password, host, port, path, query, fragment, raw}query একটি map।
url.encode(s) → stringএকটি component percent-encode।
url.decode(s) → stringencode-এর reverse।
url.build_query(params) → string{key: value}k1=v1&k2=v2
url.parse_query(s) → mapk1=v1&k2=v2 → map।

আরও দেখুন