The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/database > Query > toString

Query.toString() method

Gets the absolute URL for this location.

The toString() method returns a URL that is ready to be put into a browser, curl command, or a refFromURL() call. Since all of those expect the URL to be url-encoded, toString() returns an encoded URL.

Append '.json' to the returned URL when typed into a browser to download JSON-formatted data. If the location is secured (that is, not publicly readable), you will get a permission-denied error.

Signature:

toString(): string;

Returns:

string

The absolute URL for this location.