Packages

class URL extends Object

This module has utilities for URL resolution and parsing. Call require('url') to use it.

Annotations
@RawJSType() @native() @JSImport("url", "URL")
See also

https://nodejs.org/api/url.html

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. URL
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new URL(input: String, base: |[String, URL] = js.native)

    input

    The input URL to parse

    base

    The base URL to resolve against if the input is not absolute.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. var auth: String

    The auth property is the username and password portion of the URL, also referred to as "userinfo".

    The auth property is the username and password portion of the URL, also referred to as "userinfo". This string subset follows the protocol and double slashes (if present) and precedes the host component, delimited by an ASCII "at sign" (@). The format of the string is {username}[:{password}], with the [:{password}] portion being optional.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  11. var hash: String

    Gets and sets the fragment portion of the URL.

  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. var host: String

    Gets and sets the host portion of the URL.

  14. var hostname: String

    Gets and sets the hostname portion of the URL.

    Gets and sets the hostname portion of the URL. The key difference between url.host and url.hostname is that url.hostname does not include the port.

  15. var href: String

    Gets and sets the serialized URL.

  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. var origin: String

    Gets the read-only serialization of the URL's origin.

  22. var password: String

    Gets and sets the password portion of the URL.

  23. var pathname: String

    Gets and sets the path portion of the URL.

  24. var port: String

    Gets and sets the port portion of the URL.

  25. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  26. var protocol: String

    Gets and sets the protocol portion of the URL.

  27. var search: String

    Gets and sets the serialized query portion of the URL.

  28. var searchParams: URLSearchParams

    Gets the URLSearchParams object representing the query parameters of the URL.

    Gets the URLSearchParams object representing the query parameters of the URL. This property is read-only; to replace the entirety of query parameters of the URL, use the url.search setter. See URLSearchParams documentation for details.

  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def toJSON(): String

    The toJSON() method on the URL object returns the serialized URL.

    The toJSON() method on the URL object returns the serialized URL. The value returned is equivalent to that of url.href and url.toString().

    This method is automatically called when an URL object is serialized with JSON.stringify().

    returns

    a JSON representation of the URL

  31. def toLocaleString(): String
    Definition Classes
    Object
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. var username: String

    Gets and sets the username portion of the URL.

  34. def valueOf(): Any
    Definition Classes
    Object
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped