Open In App

How to retain special characters in ExpressJS router URL request ?

There are some special characters that might be used for some other thing instead of just showing in the URL. If we want to use the special characters in the URL we need to encode them. The following table shows the encoded value of each special character.



Also we can use a method called as encodeURIComponent(“a+b!c+d”)

Setting up environment and Execution:



Front-End:

Back-End:

Output:


Article Tags :