Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9012707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:04:27+00:00 2026-06-16T03:04:27+00:00

In RestKit Version 0.10.x I used [[RKObjectManager sharedManager] loadObjectsAtResourcePath:@/special/path usingBlock:^(RKObjectLoader *loader) { loader.objectMapping =

  • 0

In RestKit Version 0.10.x I used

[[RKObjectManager sharedManager] loadObjectsAtResourcePath:@"/special/path" usingBlock:^(RKObjectLoader *loader) {
            loader.objectMapping = aMapping;
            loader.delegate = _delegate;
            loader.method = RKRequestMethodPOST;
            loader.userData = [MobileGatewayReauthentication class];
            loader.params = [anDictionary toJsonRKParam];
        }];

to add a NSDictionary to loader.params to send a collection of parameters as the HTTP body of the request.


Since RestKit 0.20.0 the method loadObjectsAtResourcePath has been replaced by the following method, where it is no longer possible to pass a NSDictionary in parameters, which is used as HTTP Body (JSON encoded):

[RKObjectManager.sharedManager getObjectsAtPath:path parameters:params success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult)
{
    NSLog(@"success");
} failure:^(RKObjectRequestOperation *operation, NSError *error) {
    NSLog(@"failure");
}];

When working with [[RKObjectManager sharedManager].HTTPClient (AFNetworking) it works like a charm when setting:

[[RKObjectManager sharedManager].HTTPClient setParameterEncoding:AFJSONParameterEncoding];

[[RKObjectManager sharedManager].HTTPClient postPath:path parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
    NSLog(@"Response: %@", operation.responseString);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    NSLog(@"Error: %@",error.localizedDescription);
}];

But I need the higher-level object mapper.


[[RKObjectManager sharedManager].HTTPClient setParameterEncoding:AFJSONParameterEncoding];

has no effect on [RKObjectManager sharedManager] but

[[RKObjectManager sharedManager].HTTPClient setDefaultHeader:@"aHeader" value:@"aValue"];

has. So I assumed that setParameterEncoding works, too.

Is it a bug, is it not yet implemented, or have I missed something?

Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:04:28+00:00Added an answer on June 16, 2026 at 3:04 am

    I really have missed something.

    loadObjectsAtResourcePath get’s (for sure) called with RKRequestMethodGET. So the parameters get append to the URL, not to the HTTP body.

    To append the parametrs as a JSON HTTP body, you have to use a post method, for example

    - (void)postObject:(id)object
                  path:(NSString *)path
            parameters:(NSDictionary *)parameters
               success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success
               failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure;
    

    Excuse the hasty question. I should have seen it before.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with RestKit on iOS and after setting a route: [[RKObjectManager sharedManager].router routeClass:[MyClass
I have been trying to post using RestKit after I have successfully used it
I'm using RestKit version 0.2 and I'm seeing it block the UI (meaning, the
I used RestKit to load XML data from a resource. That worked perfect, but
I'm trying get RestKit (version 0.10.2) to authenticate with OAuth2. I'm using GTMOAuth2 to
I'm in a project where we use RestKit. We was using the 0.9.2 version
I have downloaded the latest RestKit version 0.9.3 from github and noticed that the
I am posting to a uri using RestKit NSString* path = [NSString stringWithFormat:@myPathHere]; NSDictionary
After adding Restkit to the Podfile : platform :ios dependency 'Facebook-iOS-SDK', '1.2' dependency 'RestKit',
I've got RestKit in my iPhone app interacting with a Rails app on Heroku,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.