2016-12-26 38 views
0

请帮助我。 在我的项目中,我没有任何视图。我需要测试我的方法POST - PostBook。我怎样才能做到这一点? 我试图写url请求,但只能在方法Get-GetAllUsers中访问。WebApi2。如何引用HttpPost的方法?

enter image description here

+1

你可以使用邮差,非常好的工具,用于测试的API https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop –

回答

1

的Fiddler工具将是有益的: http://www.telerik.com/fiddler

它包含请求作曲家,你可以用它来创建一个使用GET或POST谓词的请求。

enter image description here

+0

我应该如何提出一个要求,如果我有routeTemplate:“API/{controller}/{id}“, - http:// localhost:59039/PostBook?T –

+0

api/book ..... ??? –

相关问题