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/GetProj开发者_开发知识库ects?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?
Maybe use HTTP POST instead HTTP GET to hide these parameters?
精彩评论