Closed markst closed 4 years ago
I suppose this would also involve exposing RequestType
& ResponseType
enums.
Current workaround:
let primaryKey = resource.value(forKey: resource.entity.sync_localPrimaryKey())
if primaryKey == nil {
self.post(path,
parameterType: .json,
parameters: values,
completion: completion)
} else {
self.put(path,
parameterType: .json,
parameters: values,
completion: completion)
}
Hi! I don't think the workaround might make it worthwhile to exposing those endpoints. It looks pretty clean the way you've resolve it.
Would exposing
handleJSONRequest()
every be considered?I'd like to be able to perform requests conditional on an objects primary key & have control over the caching level.
i.e: