Hi, In my project I try to use Grid Component and binding
WebApiAdaptor (I have end point service). Insert new recond is by built-in
toolbar item (add). How I can send http POST request to the webapi using
WebApiAdaptor and this built-in (adding new record)?
Here's a code snippet:
new DataManager({
url: urlCreateJson,
adaptor: new WebApiAdaptor,
headers: [{'Content-Type': 'application/xml'},
{ 'Access-Control-Allow-Origin': 'localhost:4200' },
{ 'Content-Type': 'application/json' },
{ 'Authorization': 'Bearer Vh7oqektMBNhHiKOdE4pLPKksgWvan0wE6WkCDfMx-VdDmP86cr1w' }],
requestType: 'POST',
crossDomain: true
});
this.dm.executeQuery(new Query())
.then((e: ReturnOption) => this.items = <Object[]>e.result).catch((e) => true);
Thank you in advance for your help.