title: GET all products by using id field
body: <p>I have an <code>WEB API</code> which have <code>CRUD</code> operation. For testing I have created a <code>Console application</code>. Create and GET all details are working fine. Now i want to get the product by using <code>id</code> field. Below is my code </p>
  
  <pre><code>static HttpClient client = new HttpClient();
  static void ShowProduct(Product product)
      {
  
          Console.WriteLine($"Name: {product.Name}\tPrice: {product.Price}\tCategory: {product.Category}", "\n");
      }
  static async Task&lt;Product&gt; GetProductAsyncById(string path, string id)
      {
          Product product = null;
          HttpResponseMessage response = await client.GetAsync(path,id);
          if (response.IsSuccessStatusCode)
          {
              product = await response.Content.ReadAsAsync&lt;Product&gt;();
          }
          return product;
      }
  case 3:
  
                      Console.WriteLine("Please enter the Product ID: ");
                      id = Convert.ToString(Console.ReadLine());
  
                      // Get the product by id
                      var pr = await GetProductAsyncById("api/product/", id);
                      ShowProduct(pr);
  
                      break;
  </code></pre>
  
  <p>At <code>client.GetAsync(path,id)</code> the id is giving me error <code>cannot convert string to system.net.http.httpcompletionoption</code>. For this I have checked all the articles related to it. But still unable to find the correct solution.</p>
  
  <p>Any help would be highly appreciated</p>