title: Send a parameter with Http.GetJsonAsync
body: <p>I have the following code in a Blazor app that calls an API and retrieved a list of Items based on the user id parameter.</p>
  
  <p>The Http.GetJsonAsync does not seem to allow me to enter a parameter. How do I specify the userid  variable as the parameter?</p>
  
  <p><strong>Calling the API</strong></p>
  
  <pre><code>protected override async Task OnInitializedAsync()
  {
      userid = await localStorage.GetItemAsync&lt;string&gt;("userid");
  
      myTrades = await Http.GetJsonAsync&lt;ItemForTrade[]&gt;("api/Trading/GetTradesForUser");        
  }
  </code></pre>
  
  <p><strong>The API code</strong></p>
  
  <pre><code>[Authorize]
  [HttpGet("[action]")]
  public async Task&lt;List&lt;ItemForTrade&gt;&gt; GetTradesForUser(string userid)
  {
      return await tradingService.GetTradesForUser(userid);
  }
  </code></pre>