GTLService always sends POST request
GoogleCodeExporter opened this issue · comments
Going through the GTLService.m file I discovered that the library always uses
POST as HTTP method. Isn't that wrong? I'm requesting a list from the YouTube
API and the HTTP method for that should be GET, however the library always uses
POST.
In -GTLService
fetchObjectWithMethodNamed:objectClass:parameters:bodyObject:requestID:urlQueryP
arameters:delegate:didFinishSelector:completionHandler:executingQuery:ticket:
and in executeBatchQuery:delegate:didFinishSelector:completionHandler:ticket:
the method is hardcoded to POST as you can see in the attached screenshot. Only
the REST fetch method
fetchObjectWithURL:objectClass:bodyObject:ETag:httpMethod:mayAuthorize:delegate:
didFinishSelector:completionHandler:ticket: has a flexible HTTP method but that
is never used in any of my API calls.
Original issue reported on code.google.com by jonas.m....@gmail.com
on 24 Apr 2014 at 11:22
Attachments:
- [Bildschirmfoto 2014-04-24 um 13.14.18.png](https://storage.googleapis.com/google-code-attachments/google-api-objectivec-client/issue-61/comment-0/Bildschirmfoto 2014-04-24 um 13.14.18.png)
The library uses json rpc for the queries it generates, so that always is a
POST. There are methods exposed on the service to allow someone to make their
own REST calls, the library just doesn't generate those.
Original comment by thomasvl@google.com
on 24 Apr 2014 at 12:05
- Changed state: Invalid