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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:25:42+00:00 2026-06-02T16:25:42+00:00

Is anybody able to help me get a string returned from an NSURLRequest on

  • 0

Is anybody able to help me get a string returned from an NSURLRequest on an iPhone app? I have to send some user credentials to a URL and it will return a customer ID number. That is what I need to be pulled in as a string, I am not used to doing working with servers or HTTP requests, so any help will be great. I have already read the Apple Docs about it and am a bit lost on this part.

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

    This is a standard pattern async downloader:

    In .h file:

    NSMutableData *responseData;
    

    And .m file:

    -(void) execute {
        NSString *urlString = @"http://www.google.com";
        responseData = [[NSMutableData data] retain];
        NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString]];
        [[NSURLConnection alloc] initWithRequest:request delegate:self];
    }
    
    -(void) connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response{
        [responseData setLength:0];
    }
    
    -(void) connection:(NSURLConnection *)connection didReceiveData:(NSData *)data{
        [responseData appendData:data];
    }
    
    -(void) connectionDidFinishLoading:(NSURLConnection *)connection{
        [connection release];
        NSString *data = [[[NSString alloc] initWithData:responseData encoding:NSASCIIStringEncoding] autorelease];
        NSLog(@"%@", data);
        [responseData release];
    }
    

    This will download Google and outprint the content.

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

Sidebar

Related Questions

Can anybody please, help me out in get/set cookie in http get request from
Anybody know how to get all of these in a C# app that leads
Can anybody give me some help for figuring out the problem below. Here are
I want to insert data from database to table. I am able to get
I have a hyperlink which should print information from sql database.But I'm not able
can anybody shed some light on this ? I can't seem to be able
Can anybody point me in the right direction to be able to encrypt a
Has anybody used OProfile tool on android...If you are able to profile please provide
Anybody have any ideas? The situation is like this: I have a primary rails
Anybody knows where the :// or the // comes from in most URIs syntaxes?

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.