How to pass the parameters to the rest web service without using the (?) Symbol?

advertisements

I have developed a rest web service by using the following link

http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/simplerestservice11172009221218PM/simplerestservice.aspx

Now, I am passing parameters to this rest web service by using URL. I am passing parameters as follows

http://localhost:50362/PMTSRest/Service.svc/GetProjects?ProjectID=1

Now I want to know is there any way to remove the question mark in the URL & instead of it use any other symbol or how to pass parameters to the rest web service without using the (?) symbol ? Can you please provide me any code or link through which I can resolve the above issue?


I think you are asking how to put the parameters in a path segment. e.g.

[ServiceContract]
public interface ISearch
{
    [OperationContract]
    [WebGet(UriTemplate = "/Search/{name}", BodyStyle = WebMessageBodyStyle.Bare)]
    string  GetGreeting(string name);
}

Is this what you are looking for?