app.component.ts
Step 1: Json Data
this.objsearch=[
{ "Key": "FirstName", "value": this.firstName },
{ "Key": "MiddleName", "value": this.middleName },
{ "Key": "fatherName ", "value": this.fatherName },
]
Method To call service Serice class:
this.ServiceObject.saveData(JSON.stringify(this.objsearch))
.subscribe(response => (this._param) = response);
}
Service.ts class
public _saveDataURL= 'http://localhost:53915/api/ComapnyAndProduct/DeleteItem';
saveData(objSearch: any)
{
return this._http.post(this._saveDataURL,objSearch)
.map((response: Response) => response.json());
}
Web api
[HttpPost]
public IHttpActionResult DeleteItem([FromUri]Mregistration objSearch)
{
return ok();
}