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 7996543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:43:59+00:00 2026-06-04T14:43:59+00:00

Alright I’ve been debugging the whole day but can’t figure out what the problem

  • 0

Alright I’ve been debugging the whole day but can’t figure out what the problem is with my code.

The goal is to send a POST with RestKit to the Heroku API with a username/password to retrieve the API key.

The problem is that I’m only able to sent the request once. When sending the request the second time I get errors. (So first time I do get the API key binded to my object, but the second time just a error)

I’m using the current version of RestKit (0.10)

The code:

- (void)objectLoader:(RKObjectLoader *)objectLoader didFailWithError:(NSError *)error
{
    NSLog(@"didFailWithError: %@", error);
}
- (void)objectLoader:(RKObjectLoader *)objectLoader didLoadObject:(id)object
{
    Account *account = (Account *)object;
    NSLog(@"API_KEY: %@", account.apiKey);
}

- (IBAction) login:(id)sender
{
    Account *account = [[Account alloc] init];
    account.email = [emailField text];
    account.password = [passwordField text];

    [[RKObjectManager sharedManager] postObject:account delegate:self];
}

LOG

/// ---> FIRST CLICK
2012-05-25 14:57:00.028 HerokuApp[11154:fb03] API_KEY: 1234567890
/// ---> SECOND CLICK
2012-05-25 14:57:03.427 HerokuApp[11154:fb03] W restkit.network:RKObjectLoader.m:281 Unable to find parser for MIME Type 'text/html'
2012-05-25 14:57:03.427 HerokuApp[11154:fb03] W restkit.network:RKObjectLoader.m:309 Encountered unexpected response with status code: 200 (MIME Type: text/html -> URL: https://api.heroku.com/login -- https://api.heroku.com -- https://api.heroku.com -- https://api.heroku.com)
2012-05-25 14:57:03.429 HerokuApp[11154:fb03] didFailWithError: Error Domain=org.restkit.RestKit.ErrorDomain Code=4 "The operation couldn’t be completed. (org.restkit.RestKit.ErrorDomain error 4.)"

Can anybody help me explaining why this behaviour is occuring?

  • 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-04T14:43:59+00:00Added an answer on June 4, 2026 at 2:43 pm

    Perhaps the API behaves differently when you are logged in. From your log messages, it is appearing to return back text/html content, and not something that RestKit knows how to deal with.

    Run in the simulator on a machine where Wireshark is capturing packets. Reproduce the error, then find the TCP stream where this is happening and look at it. If you need help, update your question with the result of “Follow Stream” in Wireshark so that we can see the full HTTP traffic.

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

Sidebar

Related Questions

Alright, I'm trying to figure out why I can't understand how to do this
Alright I've been trying to find an answer to this for hours already but
Alright. This may be difficult but I have been struggling for quite a bit
Alright, this problem seems to be way above my head! I have this code:
Alright, I'm not sure if this question has been asked before so if it
Alright, this one's interesting. I have a solution, but I don't like it. The
Alright, I hope this isn't too broad a question but my curiosity got the
Alright, hard to phrase an exact title for this question, but here goes... I
Alright, i dont know how to explain it well.. but i have a switch
Alright y'all. I am attempting to write a bit of code that places typographic

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.