Calling API with Int Array
From Logic Wiki
Revision as of 22:55, 9 May 2019 by AliIybar (Talk | contribs) (Created page with "Category:API Category:ASP.NET <pre> [HttpGet] public async Task<IActionResult> GetByIds([fromQuery(Name="ids")] int[] ids) { ... } </pre> and call it like <pre> let...")
[HttpGet]
public async Task<IActionResult> GetByIds([fromQuery(Name="ids")] int[] ids)
{
...
}
and call it like
let url = this.endPoint + '/GetByIds=' + myids.join('&');
this.http.get<something>(url).pipe(tap(data => console.log('Returned Data : ' + JSON.stringify(data))));