HttpGet请求的Fiddler Composer格式

时间:2017-10-31 16:47:03

标签: get request fiddler

这应该是一个API 101问题。我被卡住了。我有一个工作的托管API,它接受一个HttpGet请求来返回一个简单的“Hello”响应。我的ASP.Net应用程序工作,但我似乎无法使用Fiddler测试这个(然后转移到Android应用程序)。 ASP Web服务声明:

  [OperationContract]
    [WebInvoke(Method = "GET",
        RequestFormat = WebMessageFormat.Xml,
        ResponseFormat = WebMessageFormat.Xml,
        BodyStyle = WebMessageBodyStyle.Wrapped,
        UriTemplate = "SayHello/{userId}")]
    string SayHello(int userId);

我无法弄清楚Get请求使用的格式:我尝试过: 在Fiddler中,我将localhost测试编写为:

http://localhost:51276/AppWebService.svc?SayHello  (returns wdsl page)
http://localhost:51276/AppWebService.svc/SayHello  (returns 400 error)
http://localhost:51276/AppWebService.svc?SayHello&userId=1000 (returns wdsl)

所以,我不确定我写的'错误'。

0 个答案:

没有答案
相关问题