url=`https://xxxxxxxxxxx.com/HiThere/${firstName}|${lastName}`
I'm passing this but during request its changing to https://xxxxxxxxxxx.com/HiThere/${firstName}%7C${lastName}
url=`https://xxxxxxxxxxx.com/HiThere/${firstName}|${lastName}`
I'm passing this but during request its changing to https://xxxxxxxxxxx.com/HiThere/${firstName}%7C${lastName}
How to pass “|” symbol in Axios URL?
Be certain that you are getting it correctly, and not converting it.
See: How to prevent Axios from encoding my request parameters?, Getting Started With Axios, or Get parameter array with key value.
The "encoding" ought to be done in the standard manner, it's up to the decoder to 'do the right thing'.
See: HTML URL Encoding Reference - W3Schools, URL Encoding | Maps URLs | Google Developers or Google fonts URL break HTML5 Validation on w3.org.
The pipe is encoded as: %7C
You cannot use < > # % { } | \ ^ ~ [ ] characters in a url safely. Please check this link for more information regarding which all characters can be used safely. So either you have to change the symbol or decode the '%7C'.