Skip to content

buildUrl

buildUrl(baseUrl, path, params?): string

Builds a request URL. An undefined/null parameter is not emitted at all, so the URL for “no options” is byte-identical to a hand-written one — a consumer’s CDN keys its cache on the URL, and ?resolve=0&raw=false would be a different key from nothing. An array parameter is repeated per value (category=a&category=b, the API’s own form).

string

string

Record<string, QueryValue> = {}

string