Calling API with Int Array

From Logic Wiki
Jump to: navigation, search


[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))));