Re: How to determine the Http Method type being implemented for web service API
Re: How to determine the Http Method type being implemented for web service API
- Subject: Re: How to determine the Http Method type being implemented for web service API
- From: Andreas Liebschner <email@hidden>
- Date: Mon, 24 Jun 2013 09:14:56 +0200
On Mon, Jun 24, 2013 at 8:05 AM, Omkar Ramtekkar
<email@hidden> 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?
The proper way for the backend to deal with requests using an
unsupported HTTP method would be to return a 405 status code and a
list of supported methods in the "Allow" header.
If you do get a 405 status code, try looking for that header.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden