POSTing value into a Web API method using a standard jQuery $.post的C#(from the controller(MVC))中的等价物是什么我使用一个标准的jQuery $.post让它工作,如下所示:
$.post('/api/reports', { AgentId: AgentId, ReportName: ReportName,
我正在使用phpunit在Laravel 8中创建单元测试,并且我有一个控制器,它使用外部API来使用get客户端为我的函数获取数据。我在Controller.php中放置了调用口吻的方法,这样就可以通过扩展这个类在任何其他控制器中访问它。stuff to get the response...}
在其他控制器上,我调用方法来执行API调用。someMethod()<