Web API ModelBinding From URI

后端 未结 2 1570
自闭症患者
自闭症患者 2021-02-20 06:47

So I have a custom Model Binder implemented for DateTime type and I register it like below:

void Application_Start(object sender, EventArgs e)
{
            


        
2条回答
  •  终归单人心
    2021-02-20 07:25

    It looks like you want to post some data to the server. Try to use FromData and post JSON. FromUri is typically used to fetch some data. Use WebAPI's conventions and allow it to work for you.

提交回复
热议问题