English 中文(简体)
WCF WebInvoke属性可将GET作为一种方法
原标题:Can the WCF WebInvoke attribute take GET as a method

网上Invoke属性是否真能将全球教育视为一种方法? 在微软文件中,我看不到这方面的任何概念。 我看到,它在某些论坛实例中得到了使用。

原则上,在使用网络时应当如此。 你能够担任职务,并删除。 相比之下,在使用WebGet时,你只能使用GET verb上空的吉大港山区,这意味着你不能张贴、删除和佩特。 现在,“公平行动”不应修改数据,根据W3org的说法,数据是多余的,因此不在网上Invoke属性中。 人们可以指出,GET verb在网络Invoke属性中的作用或存在,特别是在REST方案拟订方面。

最佳回答

WebInvoke是包括GET在内的任何吉大港定居地。 如果你与教育、青年和体育部一起使用,你必须遵循所有教育、技术和革新方面的限制,操作参数必须简明扼要,以了解世界投资协会的路径论点。

WebGet is only for GET verb and IMHO, it ismain to show differences between GET and other verbs (GET should be idempotent, GET don t have body, et al.)

最重要的方法。 使用这些特性的网络是内部的<代码>。 GetWebMethod:

internal static string GetWebMethod(OperationDescription od)
{
    WebGetAttribute wga = od.Behaviors.Find<WebGetAttribute>();
    WebInvokeAttribute wia = od.Behaviors.Find<WebInvokeAttribute>();
    EnsureOk(wga, wia, od);
    if (wga != null)
    {
        return "GET";
    }
    if (wia == null)
    {
        return "POST";
    }
    return (wia.Method ?? "POST");
}

As you can see GET method for WebInvoke is normally processed.

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签