error uploading document to google docs using post request
i am using to upload document to google docs. But it response it returns invalid token. I'm using the token that google returned me so it can't be invalid. Am i doing some thing in the Authorization header?

    NSURL *url = [NSURL URLWithString:@"https://www.google.com/accounts/ClientLogin"];

    NSMutableURLRequest *urlRequest = [[NSMutableURLRequest alloc]initWithURL:url];

    [urlRequest setHTTPMethod:@"POST"];

    [urlRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-type"];

    NSString *bodyContent = [NSString stringWithString:@"accountType=HOSTED_OR_GOOGLE&Email=uzair.shahzad89@gmail.com&Passwd=dellinspiron&service=cl&source=Gulp-CalGulp-1.05"];

    [urlRequest setHTTPBody:[bodyContent dataUsingEncoding:NSUTF8StringEncoding]];

    NSData *returnData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:nil error:nil];

    NSString *newDataString = [[NSString alloc]initWithData:returnData encoding:NSUTF8StringEncoding];

    NSArray *arr=[newDataString componentsSeparatedByString:@"\n"];

    NSString *slugStr = [[NSString stringWithString:@"tile"]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

    NSURL *audioUrl = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/ask.html", [[NSBundle mainBundle] resourcePath]]];
    NSData *audioData = [[NSData alloc]initWithContentsOfURL:audioUrl];
    int a=[audioData length];
    NSString *Length = [NSString stringWithFormat:@"%d" , a];

    NSString *authorization = [NSString stringWithFormat:@"GoogleLogin %@" , [arr objectAtIndex:2]];

    NSLog(@"%@" , authorization);

error uploading document to google docs using post request
===

i am using to upload document to google docs. But it response it returns invalid token. I'm using the token that google returned me so it can't be invalid. Am i doing some thing in the Authorization header?

    NSURL *url = [NSURL URLWithString:@"https://www.google.com/accounts/ClientLogin"];

    NSMutableURLRequest *urlRequest = [[NSMutableURLRequest alloc]initWithURL:url];

    [urlRequest setHTTPMethod:@"POST"];

    [urlRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-type"];

    NSString *bodyContent = [NSString stringWithString:@"accountType=HOSTED_OR_GOOGLE&Email=uzair.shahzad89@gmail.com&Passwd=dellinspiron&service=cl&source=Gulp-CalGulp-1.05"];

    [urlRequest setHTTPBody:[bodyContent dataUsingEncoding:NSUTF8StringEncoding]];

    NSData *returnData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:nil error:nil];

    NSString *newDataString = [[NSString alloc]initWithData:returnData encoding:NSUTF8StringEncoding];

    NSArray *arr=[newDataString componentsSeparatedByString:@"\n"];

    NSString *slugStr = [[NSString stringWithString:@"tile"]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

    NSURL *audioUrl = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/ask.html", [[NSBundle mainBundle] resourcePath]]];
    NSData *audioData = [[NSData alloc]initWithContentsOfURL:audioUrl];
    int a=[audioData length];
    NSString *Length = [NSString stringWithFormat:@"%d" , a];

    NSString *authorization = [NSString stringWithFormat:@"GoogleLogin %@" , [arr objectAtIndex:2]];

    NSLog(@"%@" , authorization);
