I'm trying to map PUTs and DELETEs to OData resource paths. OData address resources with actual parentheses, like so:
/Thing(23)
Is there a way to route this in RestKit? Currently the parentheses get stripped out and I end up with
/Thing:23
I have a workaround where I route with [ and ] instead of ( and ), and then I replace those in requestWillPrepareForSend, but that solution smells. I'd like to be able to escape the parentheses somehow and move on.
My setup:
[objectManager.router routeClass: [Thing class] toResourcePath: @"/Thing(:id)" forMethod: RKRequestMethodPUT];
[objectManager.router routeClass: [Thing class] toResourcePath: @"/Thing(:id)/" forMethod: RKRequestMethodDELETE];