Search code examples
c#.netwcfweb-servicessvc

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


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 could 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


Solution

  • 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.