Node url.toString() Method
The url.toString() method is an inbuilt application programming interface(API) of the URL module within the Node.JS. The url.toString() method is used to return the serialized URL. The returned value is equivalent to that of url.href and url.toJSON().
Parameters: This method accepts single parameter as mentioned above and described below:
- url: It is an object created by URL constructor.