I have a service that calls the API like this:
return this._http
.post(appSettings.apiUrl + \'SomeController/SomeAction\', params, {withCredentials:
Here another sample based on @martin's answer:
public searchMediData(searchtearm: string) : Observable
{
return this.http
.get(this.url)
.map(response => {
let data = response.json();
let medidata = data as MediData[];
return medidata;
})
.concatMap(array => Observable.from(array))
.filter(medi => {
let searchTearmUpperCase = searchtearm.toUpperCase();
let mediNameUpperCase = medi.Name.toUpperCase();
return mediNameUpperCase.includes(searchTearmUpperCase);
})
.toArray();
}