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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:21:58+00:00 2026-05-24T19:21:58+00:00

I have an array which includes URLs of JSON feeds. I am using ASIHTTPRequest

  • 0

I have an array which includes URLs of JSON feeds. I am using ASIHTTPRequest to download the feed and process it. Each feed contains several JSON entries or objects. The request downloads the data and selects only one object and stores it.

The feeds URLs look like this: http:www.*.com/id.json, where id is some string. After downloading the data and selecting the object, I’d like to store the id in a dictionary as a key that maps to a value of the object downloaded.

How can I pass that string with the request? So for example:

ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
request.tag = 3;
[request setDelegate:self];
[request startAsynchronous];

Now in requestFinished, I can identify that request as follows: if (request.tag == 3. Along with tag of 3, I’d like to send the ID. So I can do something with it in if (request.tag == 3). Is there some property where I can pass a string or any data along with a request?

  • 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-24T19:21:59+00:00Added an answer on May 24, 2026 at 7:21 pm

    You can pass your own dictionary of data in the userInfo property, which, like the tag property, can be read back on the request after receiving the response.

    NSString* jsonId = @"1234";
    request.userInfo = [NSDictionary dictionaryWithObject:jsonId forKey:@"id"];
    

    See documentation.

    If you need to handle success and failure on many different types of
    request, you have several options:

    1. If your requests are all of the same broad type, but you want to
      distinguish between them, you can set the userInfo NSDictionary
      property of each request with your own custom data that you can read
      in your finished / failed delegate methods. For simpler cases, you can
      set the request’s tag property instead. Both of these properties are
      for your own use, and are not sent to the server.

    2. If you need to handle success and failure in a completely
      different way for each request, set a different setDidFinishSelector /
      setDidFailSelector for each request


    If you want to post data like a web page posts a form, you can use the ASIFormDataRequest subclass. It makes it very easy to send POST requests with strings you add individually:

    ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
    [request setPostValue:@"Ben" forKey:@"first_name"];
    [request setPostValue:@"Copsey" forKey:@"last_name"];
    

    See the documentation.

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

Sidebar

Related Questions

I have an array which contains another array Would I notate it this way?
I have an array which contains around 50-200 hyperlinks. How can I pass this
Am I missing something in the Array documentation? I have an array which contains
I have an wrapping object array -in fact a matrix- which includes a checkbox,
I have an array of directories (a search which includes subdirectories). I'd like to
I have a PHP code which includes several files if they exists. It might
I have an array which is a list of domains, I want to print
I have an array which has the contents as the result of an sql
I have an array which i need to sort its elements by occurrence then
i have an array which could look like this: $config[$name][$array]['key'] = 'value'; // here

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.