My request is
request_ = [[ASIFormDataRequest requestWithURL:requestUrl] retain];
[request_ setDelegate:self];
[request_ setRequestMethod:@"GET"];
[request_ setTimeOutSeconds:HTTP_TIME_OUT];
[request_ startAsynchronous];
But the response from the server is
HTTP Status 405 – Request method ‘GET’ not supported. The specified HTTP method is not allowed for the requested resource (Request method ‘GET’ not supported).
Please note that the url doesn’t have any “GET” parameters along with it even though it is a get request. The thing is I am getting the proper response from the server when simply I take the request URL in a browser or when I call it using “HttpRequester”(a Firefox add-on to test http requests – well I’m sure you know that). What could have went wrong?
Thanks in advance.
Balu
Solved it. It was because of the absence of the header parameter “Accept” in requests that have been made. Once it was added, everything worked like a charm.
Also replaced ASIFormDataRequest with ASIHTTPRequest(that one was a silly mistake).