开发者

How would you form the URL to test the output of a SVC?

开发者 https://www.devze.com 2023-03-15 05:29 出处:网络
I have a SVC web service located at http://localhost/myProjects/WebServices/Retriever.svc Let\'s say Retriever.svc.cs has a method

I have a SVC web service located at

http://localhost/myProjects/WebServices/Retriever.svc

Let's say Retriever.svc.cs has a method

[WebGet]
[OperationContract]
public string[] CoolMethod(string prefixText, int count)
{
.....
return some string[];
}

How coul开发者_运维百科d I form a URL in my browser to see what the output of it would be?

Can I do something along the lines of

http://localhost/myProjects/WebServices/Retriever.svc/CoolMethod?arg1?arg2


Turns out you can do

http://localhost/myProjects/WebServices/Retriever.svc/CoolMethod?prefixText=box&count=5

Should have tried it before asking, but leaving it here for others to reference.

0

精彩评论

暂无评论...
验证码 换一张
取 消