TIMEX TIMEX - 1 month ago 4
Javascript Question

How do I URl encode something in Node.js?

I want to URL encode this:

SELECT name FROM user WHERE uid = me()

Do I have to download a module for this? I already have the request module.

Joe Joe

You can use JavaScript's encodeURIComponent:

encodeURIComponent('select * from table where i()')