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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:08:12+00:00 2026-06-05T18:08:12+00:00

I am trying to log into google reader using AfNetworking AfHttpClient but I am

  • 0

I am trying to log into google reader using AfNetworking AfHttpClient but I am getting this error that I can;t seem to figure out.

Below is my subclass of AFNetworking:

// main url endpoints
#define GOOGLE_ACCOUNTS_BASE_URL @"https://www.google.com/accounts/"

@implementation ADPGoogleLoginClient

+ (ADPGoogleLoginClient *)sharedClient {
    static ADPGoogleLoginClient *_sharedClient = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _sharedClient = [[ADPGoogleLoginClient alloc] initWithBaseURL:[NSURL     URLWithString:GOOGLE_ACCOUNTS_BASE_URL]];
    });

    return _sharedClient;
}

- (id)initWithBaseURL:(NSURL *)url {
    self = [super initWithBaseURL:url];
    if (!self) {
        return nil;
    }

    [self registerHTTPOperationClass:[AFXMLRequestOperation class]];

    // Accept HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
    [self setDefaultHeader:@"Content-type" value:@"text/plain"];
    [self setDefaultHeader:@"Accept" value:@"text/plain"];

    return self;
}

@end

And then I try to form a request by using the following code:

//set up request params
    NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
                            @"googlereader-ios-client", @"client",
                            [keychainCredentials objectForKey:(__bridge id)kSecAttrAccount], @"Email",
                            [keychainCredentials objectForKey:(__bridge id)kSecValueData], @"Passwd",
                            @"reader", @"service",
                            @"ipad", @"source", nil];

    //make requests
    [[ADPGoogleLoginClient sharedClient] getPath:@"ClientLogin" 
                                      parameters:params
                                         success:^(AFHTTPRequestOperation *operation , id responseObject)
     {
         //parse out token and store in keychain
         NSString* responseString = [operation responseString];  
         NSString* authToken = [[[responseString componentsSeparatedByString:@"\n"] objectAtIndex:2] 
                                stringByReplacingOccurrencesOfString:@"Auth=" withString:@""];

         keychainToken = [[KeychainItemWrapper alloc] initWithIdentifier:@"GReaderToken" accessGroup:nil]; 
         [keychainToken setObject:authToken forKey:(__bridge id)kSecValueData]; 

         loginSuccess();

     } 
           failure:^(AFHTTPRequestOperation *operation, NSError *error) 
     {
         NSLog(@"There was an error logging into Reader - %@", [error localizedDescription]);

         loginFailure(error);
     }];

Im setting the default headers to

[self setDefaultHeader:@"Content-type" value:@"text/plain"];
    [self setDefaultHeader:@"Accept" value:@"text/plain"];

so im not sure why it still thinks it is expecting xml?

  • 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-05T18:08:16+00:00Added an answer on June 5, 2026 at 6:08 pm

    Hi Matt so I just got around to testing this. Looks like I was registering the wrong AF operation. I changed

    [self registerHTTPOperationClass:[AFXMLRequestOperation class]]; 
    

    to

    [self registerHTTPOperationClass:[AFHTTPRequestOperation class]]; 
    

    and all was good!

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

Sidebar

Related Questions

I'm trying to write a script so I can log into a website, but
I'm trying to build an android app that will log into a website, scrape
I'm trying to create an app that multiple users would log into a server
I am trying to log into a reports system using java. So far, I
I'm trying to put some geolocation data from Google Maps into a database. But
I am trying to make a Java web application where users can log into
I get this error when trying to start the server. logger.rb:541:in `exist?': can't convert
I found this snippet of code here that allows you to log into a
I am getting this error while trying to Parse the Xml response from the
I am trying to log into facebook here is my code: <body> <form id=form1

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.