title: Accessing the query string in ASP.Net Web Api?
body: <p>I'm using the default template generated by Asp.net Web Api. I'm working with the Get() Part:</p>
  
  <pre><code>        // GET api/values
      public IEnumerable&lt;string&gt; Get()
      {
          return new string[] { "value1", "value2" };
      }
  </code></pre>
  
  <p>For some reason the i thought the only thing you had to do to access to query string was just to create an input string variable. So i created one more function (the only change i made) to the default controller generated:</p>
  
  <pre><code>        public IEnumerable&lt;string&gt; Get(string queryString)
      {
          return new string[] { "value3", "value4" };
      }
  </code></pre>
  
  <p>I put a break point in both methods but even if i add a query string it always goes to the function with no parameters. So if i go to <code>http://mybaseurl/api/values?foo=f</code>
   it still is going to Get() instead of get(string queryString). Does it not work the way i thought? I know i can access the query string in the Get() function using <code>Request.RequestUri.ParseQueryString();</code> but i prefer to have it separated like this if possible.</p>