URL http://localhost/mysite/mypage?param=123 works fine. However, if I want to put some special characters in param, like ?, /
http://localhost/mysite/mypage?param=123
param
?
/
I did below, it works fine.
const myQueryParamValue = "You&Me"; const ajaxUrl = "www.example.com/api?searchText="+encodeURIComponent(myQueryParamValue)