哪个.Net框架支持REST [英] Which .Net framework supports REST

查看:57
本文介绍了哪个.Net框架支持REST的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想知道哪个.Net框架支持REST api,或者REST api独立于.Net框架.

JSON也是如此.它是否支持.Net Framework 2.0、3.0或仅支持.NET Framework 2.0、3.0或更高版本.


- - - 更新 - - - - - - - - - - - - - - - - - - - - - - --------------

我找到了一个链接 msdn.microsoft.com [

Hi All,

I want to know which .Net framework supports REST apis, or is REST apis are independent of .Net framework.

Same thing with JSON. Does it supports .Net framework 2.0, 3.0 or only beyond that.


------Update---------------------------------------------------------

I found a link msdn.microsoft.com[^]
Here they have mentioned that Microsoft has added REST style services support to WCF in framework 3.5.
So, does this mean REST does not support earlier framework version.

-----------------------------------------------------------------------

Thanks,
Nagendra.

推荐答案

REST不依赖于ASP.NET,Java或任何其他框架.

http://en.wikipedia.org/wiki/Representational_state_transfer [
REST is not dependent on ASP.NET, or Java, or any other framework.

http://en.wikipedia.org/wiki/Representational_state_transfer[^]


REST 是交换数据的概念通常以XML/JSON的形式在HTTP上使用.

http://en.wikipedia.org/wiki/Representational_state_transfer

Microsoft从Framework 3.5引入了内置的WCF REST支持.

请查看以下链接,以获取有关WCF REST的更多信息.

http://msdn.microsoft.com/en-us/netframework/dd547388

http://msdn.microsoft.com/en-us/netframework/cc950529

但是,即使不使用Visual Studio的WCF REST项目模板,也可以开发REST服务.

下面的CodeProject文章演示了如何使用简单的 HttpHandler 开发REST服务.

使用C#开发REST Web服务-演练

从Framework 3.5及更高版本开始支持WCF RST中的 JSON 格式.在Web/REST方法的属性中,可以将RequestFormat属性的值分配给WebMessageFormat.Json.

编辑-拼写更正.
REST is a concept of exchanging data on HTTP generally in the form of XML/JSON.

http://en.wikipedia.org/wiki/Representational_state_transfer

Microsoft introduced inbuilt WCF REST support from Framework 3.5.

Have a look at below links for more information on WCF REST.

http://msdn.microsoft.com/en-us/netframework/dd547388

http://msdn.microsoft.com/en-us/netframework/cc950529

However you can develop REST service even without using WCF REST Project template of Visual Studio.

Below CodeProject article demonstrates how you can develop REST service using a simple HttpHandler.

Developing a REST Web Service using C# - A walkthrough

Support for JSON format in WCF RST is available from Framework 3.5 and above. In the attributes of your Web/REST Method you can assign value of RequestFormat Property to WebMessageFormat.Json.

Edited - Spelling corrections.


这篇关于哪个.Net框架支持REST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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