Search code examples
aspnetboilerplate

Http Verb Attribute Not Working


I have decorated my service interface with Http Verb Attributes, but is not working. Every method is treated as Post verb.

I'm using AspNetCore 1.1 and Abp packages 2.3.0

public interface ISettlementAppService : IApplicationService
{
    Task<PagedResultDto<SettlementListDto>> GetPaged(GetSettlementInput input);

    [HttpDelete]
    Task Cancel(EntityDto<string> input);
}

Solution

  • Do it like this;

    public class SettlementAppService : ISettlementAppService 
    {
    
        [HttpDelete]
        Task Cancel(EntityDto<string> input){
            //...
        }
    }