How to use variable inside urlEncode()

0
I want to send user id in url request as https://baseurl?query=year=’2011’&&id=’userid1234’   How do I use variable inside urlEncode method? I am not able to use variable inside urlEncode method. urlEncode(‘year=’’$year’’&&id=''$userid''’) I need year and userid in quotes in final api call.    Is there any other approach I should be taking in order to create this request.   
asked
1 answers
1

Try this...

 

urlEncode('year="' $year + '"&id="' + $userid + '"')

 

I hope it helps.

answered