Note that there are some explanatory texts on larger screens.

plurals
  1. POTastyPie / RestKit 501 Not Implemented
    primarykey
    data
    text
    <p>I'm using tastypie for a REST interface in django, from Xcode I can call the server and get data successfully using RestKit however I cannot POST data. I know it's hitting the right area as I had a 401 then turned on <code>authentication()</code> in django and that problem was solved, now I'm receiving a <code>501 Not Implemented</code> Error. I've also manually added the detail and <code>list_allowed_methods</code> to allow all forms POST/GET/ETC. I've Googled and overflowed to no avail! Help! </p> <p>Here's the code I'm using for POSTING (I'm new to RestKit so be gentle)</p> <pre><code>RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://127.0.0.1:8000/api/v1/"]]; RKObjectMapping *lotRequestMapping = [RKObjectMapping requestMapping]; [lotRequestMapping addAttributeMappingsFromDictionary:@{@"status" : @"parking_availability"}]; RKResponseDescriptor *lotResponseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:lotRequestMapping pathPattern:@"parkinglot/:primaryKey/" keyPath:nil statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)]; </code></pre> <p>Screenshot - <img src="https://i.stack.imgur.com/n5nA6.png" alt="xcode RestKit Code"></p> <p>Here's the Error See Screenshot <img src="https://i.stack.imgur.com/SaxTu.png" alt="501 Not Implemented Xcode Error"></p> <p>Text from Screenshot</p> <blockquote> <p>2012-12-19 13:23:26.145 Parkable[36586:4b07] I restkit.network:RKHTTPRequestOperation.m:143 POST '<a href="http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json" rel="nofollow noreferrer">http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json</a>' 2012-12-19 13:23:26.158 Parkable[36586:3807] E restkit.network:RKHTTPRequestOperation.m:156 POST '<a href="http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json" rel="nofollow noreferrer">http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json</a>' (501 Not Implemented): Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299,400-499), got 501" UserInfo=0x9170260 {AFNetworkingOperationFailingURLRequestErrorKey=http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json>, NSErrorFailingURLKey=<a href="http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json" rel="nofollow noreferrer">http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json</a>, NSLocalizedDescription=Expected status code in (200-299,400-499), got 501, AFNetworkingOperationFailingURLResponseErrorKey=} 2012-12-19 13:23:26.158 Parkable[36586:4b07] E restkit.network:RKObjectRequestOperation.m:271 Object request failed: Underlying HTTP request operation failed with error: Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299,400-499), got 501" UserInfo=0x9470f10 {AFNetworkingOperationFailingURLRequestErrorKey=http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json>, NSErrorFailingURLKey=<a href="http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json" rel="nofollow noreferrer">http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json</a>, NSLocalizedDescription=Expected status code in (200-299,400-499), got 501, AFNetworkingOperationFailingURLResponseErrorKey=} 2012-12-19 13:23:26.159 Parkable[36586:c07] failure - Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299,400-499), got 501" UserInfo=0x9470f10 {AFNetworkingOperationFailingURLRequestErrorKey=http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json>, NSErrorFailingURLKey=<a href="http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json" rel="nofollow noreferrer">http://127.0.0.1:8000/api/v1/parkinglot/22/?format=json</a>, NSLocalizedDescription=Expected status code in (200-299,400-499), got 501, AFNetworkingOperationFailingURLResponseErrorKey=}</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload