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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:32:12+00:00 2026-05-12T21:32:12+00:00

I am attempting to use ASIHttpRequest with the iPhone to get some information from

  • 0

I am attempting to use ASIHttpRequest with the iPhone to get some information from a query-string based API on my site.

Currently, I am in the planning stages of my design and I am kind of stuck on how I should proceed.

I would like to have a class, that will handle all of the requests I will need. I plan on having different sections of the iPhone application call this class and within the class, I would like to run the ASIHttpRequest code. For example:

  1. I will pop up a modal view that will login.
  2. This modal view will call a function with the user/pass to the API class which will then put together the URL and call it.
  3. Once the URL request has been processed and finished, it will go into the requestFinished method or whichever I choose as the selector.
  4. The modal view will get back the responseString and proceed as desired.

This is where I am stuck. I would like to somehow pass the responseString back to the original caller of the network url request.

Should I use a delegate method? If so, how can I call that from within the requestFinished method? I thought about this, but I am a little confused as to how I would have the requestFinished function call that delegate. I might be missing a simple way to pass that delegate as an object along with an ASIHttpRequest.

I also thought about NSNotificationCenter, but I feel that would be more work than using a delegate.

I appreciate any help given.

  • 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-05-12T21:32:12+00:00Added an answer on May 12, 2026 at 9:32 pm

    You can subclass ASIHttpRequest and either override its - (void)requestFinished which allows you to do some processing on the background thread (and still call [super requestFinished];) or simply add an instance variable id myDelegate; with an accessor so you can access it from your -requestFinished

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

Sidebar

Related Questions

I'm attempting to use Assembly.GetType(MyCompany.Class1.Class2) to dynamically get a type from a string. Assembly.GetType(MyCompany.Class1);
Attempting to use the amazon API to obtain product data and currently failing miserably.
When attempting to use pandoc to convert JSON based files (.ipynb) from iPython notebook
I'm attempting to use the Google geocoder API to enter user's location information directly
I'm currently attempting to use HighStock charts on my site. I'll be using a
Attempting to use the data series from this example no longer passes the JSONLint
When attempting to use HttpWebRequest to retrieve a page from my dev server, I
In attempting to use std::select1st from <functional> in a VS2008 project I found that
I'm attempting to use jsoup to sanitize the the html posted from a wysiwyg
I'm attempting to use the Github v3 API and posting JSON to update a

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.