通过Javascript和框架调用WEB API [英] Calling WEB API via Javascript and Frameworks

查看:48
本文介绍了通过Javascript和框架调用WEB API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MVC5的WEP API项目,我使用带有控制器的实体框架进行CRUD操作,在我的MVC5项目中,我通过javascript调用了API控制器的CRUD方法,但我觉得这不是最好的方式或不是最有效的,问题是,是否有一种框架通过javascript或jquery调用api.?

I am working in a WEP API project with MVC5, I use entity framework with controllers for the CRUD actions, in my MVC5 project I called to the API controllers for CRUD method via javascript, but I feel like that is not the best way or is not the most efficient, the question is, is there a kind of framework to call the api via javascript or jquery.?

推荐答案

是的,你可以制作用jquery调用你的AJAX,这就是你应该做的。 ASP.NET MVC包含jquery。
Yes, you can make your AJAX calls with jquery, and that's what you should be doing. jquery is included with ASP.NET MVC.


这篇关于通过Javascript和框架调用WEB API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆