Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How client or consumer of REST service come to know that it is a get or post service?
Posted

1 solution

This is a part of HTTP request, according to the standard on HTTP protocol: http://en.wikipedia.org/wiki/HTTP[^].

The consumer of a Web service does not need to "know" it, because a consumer actually sends a HTTP request. Could you possibly mixed up these two parts? And the service part "finds it out" what the method ("verb") is from the HTTP request.

—SA
 
Share this answer
 
v2
Comments
pavanjoshi3805 6-Dec-13 8:19am    
You are Right. I was wrong in stating my question. Suppose I have develope a RESTful service with 2 moethods, first is GetCustomer and second is a AddCustomer. Here method 1(GetCustomers)is a get method and method 2(AddCustomer) is a post method.
Now how the client or service consumer will come to know that AddCustomer is a Post method and GetCustomr is a get method?
Sergey Alexandrovich Kryukov 6-Dec-13 11:34am    
Didn't I answer? it is defined in the client code, so client "knows" it in first place, and server received the "method" in HTTP request.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900