-3

What is node.js equivalent of

    $_SERVER['QUERY_STRING']

and also to put it in:

    list($a,$b,$c ...) = explode('/', $_SERVER['QUERY_STRING']);
Charles
  • 50,943
  • 13
  • 104
  • 142
  • 3
    Have you looked at the documentation? Node's API docs are relatively short and easy to read. –  May 23 '13 at 20:14
  • 1
    Do you just want the query string? If so, just ask that. Phrasing your question in the context of another programing language (php in this case) severely limits the pool of people who can answer your question. – Abe Miessler May 23 '13 at 20:15
  • Can't remember the exact object property, but it is a direct descendent of the `request` object. A `console.log` will bring it up. – Sébastien Renauld May 23 '13 at 20:16

1 Answers1

-1

See the answer here for how to get the query string: How to get GET (query string) variables in Express.js on Node.js?

Then use querystring.parse() to get an object representing the keys and values in the query string.

http://nodejs.org/api/querystring.html#querystring_querystring_parse_str_sep_eq_options

Community
  • 1
  • 1
Erik Nedwidek
  • 6,134
  • 1
  • 25
  • 25