URL

Classin globals@fastly/js-compute 3.46.0View source

The URL class as specified by WHATWG

See also

Constructor

new URL(url: string, base?: string | URL)

Parameters

url: string
base: string | URLoptional

Properties

href

stringView source

origin

stringread-onlyView source

protocol

stringView source

username

stringView source

password

stringView source

host

stringView source

hostname

stringView source

port

stringView source

pathname

stringView source
stringView source

searchParams

URLSearchParamsread-onlyView source

hash

stringView source

Methods

toJSON(): string

Returns

string