I am getting 405 error when trying to call my api.
Angular code:
new DataManager({ url: url, adaptor: new UrlAdaptor, crossDomain: true })
.executeQuery(new Query())
.then((e: any) => {
debugger;
state.dataSource(e.result);
});
API Code
[HttpGet]
[Route("GetAllTransactionData")]
public async Task GetAllTransactionData(int clientId)
{
try
{
string userName = this.User.GetEmail();
return Ok(await _transactionService.GetAllTransactionData(clientId));
}
catch (Exception ex)
{
string correlationId = await _exceptionLogHelper.LogException(ex, "TransactionData", "GetAllTransactionData");
return BadRequest(ex.Message);
}
}
The error i am getting is :
Please note: When trying to call the API without the datamanager its working fine the api is returning the value