I have a request which is like "xxxx.com/api/xxx?url=wwww.xxx.com?id=abc"
With this kind of URL at the end ‘=abc’ value is missing. I know the reason because there is no & before the second query but the thing is I can not change the current value. How can I get the missing value?
Question posted in Javascript
A very good W3school tutorial can be found here.
A very good W3school tutorial can be found here.
2
Answers
Your url is not correct, multiple query parameters should be used with
&
not extra?
Change it like this:
xxxx.com/api/xxx?url=wwww.xxx.com&id=abc
Gather them inside an array
input query params -> ?url=wwww.xxx.com?id=abc
result -> [ { key: ‘url’, value: ‘wwww.xxx.com’ }, { key: ‘id’, value: ‘abc’ } ]