title: WebAPI 2 Get action, parameter is always null
body: <p>I am certain this is simple.
  I have a controller with one method in it:</p>
  
  <pre><code>&lt;RoutePrefix("Api/Stock")&gt;
  Public Class StockController
      Inherits ApiController
  
      &lt;Route("{id}")&gt;
      Public Function [Get](id As String, cred As credentials) As IHttpActionResult
          Try
              Using conn As New serviceInterface(serviceInterface.serverType.test)
                  Dim stockItem = New stockItem() With {
                      .lotNo = id
                  }
  
                  Dim result = conn.webServicesAdvanced.stockHubAction(cred, stockItem)
  
                  Return Ok(result.obj)
              End Using
          Catch ex As Exception
              Return InternalServerError(ex)
          End Try
  
          Return BadRequest()
      End Function
  End Class
  </code></pre>
  
  <p>As you can see, I allow 2 parameters:</p>
  
  <ul>
  <li>The id (or lotnumber)</li>
  <li>And the credentials object</li>
  </ul>
  
  <p>My credentials object is stored as a string in a cookie. Now, I have tried many things to get a $.get call to work, but I keep getting the <strong>cred</strong> object as null.
  Here is one example of my call:</p>
  
  <pre><code>self.lotEnquiry = function () {
      var lot = self.lotNumber();
  
      if (lot.length == 10) { // Our lot numbers are 10 characters long
          var cred = { cred: $.parseJSON(dataModel.getUserObject()) };
  
          console.log(cred);
  
          $.get(stockUrl + "/" + lot, cred)
              .done(function (data) {
                  console.log(data);
                  //app.navigateToLotEnquiry();
              })
              .fail(app.handleError);
      }
  };
  </code></pre>
  
  <p>and this still shows as null.
  I have tried building an object with the id and credentials specified:</p>
  
  <pre><code>var cred = {
      id: self.lotNumber,
      cred: $.parseJSON(dataModel.getUserObject())
  };
  </code></pre>
  
  <p>or even as just the object itself:</p>
  
  <pre><code>var cred = $.parseJSON(dataModel.getUserObject());
  </code></pre>
  
  <p>and I have even tried just submitting it as a string.</p>
  
  <p>No matter what I try, the object is always null (but if I do a console.log I can see everything).</p>
  
  <p>Can someone point out why?</p>