0
digitalcontrol created
I installed Microsoft.AspNet.WebApi.Core, and in interface of AppService I put [HttpPost] to change method from Get to Post, but it didn't work. Method is still Get.
5 Answer(s)
-
0
hi,
you need to add the verbs to the interface https://aspnetboilerplate.com/Pages/Documents/Dynamic-Web-API#withverb-method
public interface ITaskAppService : IApplicationService { [HttpGet] GetTasksOutput GetTasks(GetTasksInput input); [HttpPut] void UpdateTask(UpdateTaskInput input); [HttpPost] void CreateTask(CreateTaskInput input); }
-
0
I did that but only for one method. Should I add to every method?
-
0
hi digitalcontrol
If you need to modify it, you need to add for each method.
-
0
I added for each method in AppService interface Http atribute, still the same.
-
0
@digitalcontrol Is your application Net Core?
see:https://github.com/aspnetzero/aspnet-zero-core/issues/2620