Restkit request not sending parameters

前端 未结 1 914
忘掉有多难
忘掉有多难 2020-12-11 10:57

My implementation is not sending parameters. Here is the RequestDescriptor:

RKObjectMapping *userMapping = [RKObjectMapping requestMapping];
[userMapping add         


        
相关标签:
1条回答
  • 2020-12-11 11:29

    Ensure that you have set:

    manager.requestSerializationMIMEType = RKMIMETypeJSON;
    

    As the default is RKMIMETypeFormURLEncoded.


    Based on your comments and discussion, the mapping isn't being used because the class of the user is wrong. This is because it is a plain NSManagedObject rather than an RKUser instance. This means RestKit can't find the appropriate mapping. The cause for this is the custom class not being set on the User entity in your Core Data model.

    0 讨论(0)
提交回复
热议问题