title: Angular's httpclient get with params to ASP.Net Core controller
body: <p>I'm working on a simple get with search parameters, trying to use Angular's httpclient with HttpParams</p>
  
  <pre><code>  getOptions(id1: string, id2: string): Promise&lt;string[]&gt; {
  return new Promise&lt;string[]&gt;((resolve, reject) =&gt; {
    var params: HttpParams = new HttpParams();
    params.set('id1', id1;
    params.set('id2', id2);
    this.httpClient.get&lt;string[]&gt;(`${this.appConfig.apiUrl}/api/task/getoptions`, {params: params}).subscribe(resp =&gt; {
      resolve(resp);
    }, error =&gt; {
      reject(error);
    })
  });
  }
  </code></pre>
  
  <p>My endpoint looks like that:</p>
  
  <pre><code>    [HttpGet("[action]")]
      public async Task&lt;List&lt;string&gt;&gt; GetOptions([FromQuery] string id1, [FromHeader] string id2)
      {
          //...do something
      }
  </code></pre>
  
  <p>I tried all attributes like [FromQuery], [FromForm], [FromHeader],... but the data I send never arrives to the controller, although method/endpoint is being called. The values are just null.</p>
  
  <p>What am I doing wrong, or what am I missing? </p>