On Jun 24, 2013, at 12:05 AM, Omkar Ramtekkar wrote:

> I'm working on a project, where in I need to get the data from server through 
> RESTful web services.
> Server side people have implemented a few web services. I need to use those 
> methods, but I'm not sure which http method to use "Get" or "POST".
> If I use "GET" as http method and if the server web service is being 
> implemented in "POST" then I get 404 or similar http error code.
> Is there any way to find out the http method type being implemented for a web 
> server API?

By REST convention or definition, as the case may be, actions that simply 
retrieve information use the GET method and actions that add new information 
use the POST method. There may be ambiguity over whether certain add-actions 
would call for a PUT vs a POST and may be implementation-defined.

The bottom line is that if you are trying to access a web service outside of 
your control you cannot assume much. I have found that the best approach is to 
log all activity while using the web service through its public front-end and 
model after that. Also be prepared for your logic to break at any time. Such is 
the nature of web services…

HTH,

Keary Suska
Esoteritech, Inc.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to