我用Http Verb Attributes裝飾了我的服務接口,但無法正常工作。 每種方法都被視爲Post動詞。Http Verb屬性不起作用
我使用AspNetCore 1.1和ABP包2.3.0
public interface ISettlementAppService : IApplicationService
{
Task<PagedResultDto<SettlementListDto>> GetPaged(GetSettlementInput input);
[HttpDelete]
Task Cancel(EntityDto<string> input);
}
你的意思是你在裝修控制器的動作與HTTPGET,HttpPut或HttpDelete和所有的人都仍被視爲HttpPost?**你試過命名你的行動爲GetMethod,PutMethod等?** 請將您的代碼放在您的問題中 –
我沒有使用控制器。我正在使用應用程序服務和動態webapi。根據這個文檔[https://aspnetboilerplate.com/Pages/Documents/Dynamic-Web-API](https://aspnetboilerplate.com/Pages/Documents/Dynamic-Web-API),它應該只能通過裝飾界面方法。 但我弄清楚,只有具體的類方法裝飾時纔有效。也許這應該是bug,我不知道。 –