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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:46:41+00:00 2026-05-31T12:46:41+00:00

I am migrating from ASIHTTPRequest to AFNetworking and have run into an issue. I

  • 0

I am migrating from ASIHTTPRequest to AFNetworking and have run into an issue.

I am trying to hit an API with a request that overloads the post parameter. I was previously using ASIFormDataRequest for this and used this code to update 3 ids at the same time.

// ASIHTTPRequestCode
[request addPostValue:@"value1" forKey:@"id"];
[request addPostValue:@"value2" forKey:@"id"];
[request addPostValue:@"value3" forKey:@"id"];

Since AFNetworking uses an NSDictionary to store key value pairs, it doesn’t seem straight forward how to do this. Any ideas?

  • 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-31T12:46:42+00:00Added an answer on May 31, 2026 at 12:46 pm

    I can’t immediately see a direct way to do this with AFNetworking, but it is possible to do.

    If you look at the code for AFHTTPClient requestWithMethod, you’ll see this line, which is the one that sets up the request body to contain the parameters:

     [request setHTTPBody:[AFQueryStringFromParametersWithEncoding(parameters, self.stringEncoding) dataUsingEncoding:self.stringEncoding]];
    

    Basically you could pass an empty dictionary to requestWithMethod for the parameters, then it returns, call request setHTTPBody yourself, making up the query string yourself in a similar way to the way AFQueryStringFromParametersWithEncoding does it.

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

Sidebar

Related Questions

We are currently migrating from PHP4 to PHP5 and have discovered an issue. In
We are migrating from one content system into another and have tons of HTML
I'm migrating from Java 1.1. to Java 5. I notice that some methods have
I have an application that I'm migrating from flex 3 to flex 4.5. In
We have a system that is migrating from an older VARCHAR using LIKE setup
I am migrating from Ubuntu 10.04 to Ubuntu 11.10 (oneiric), but I have problems
Does anyone have any experience migrating from one DBMS to another? If you have
I am migrating from PHP4 to PHP5 I have this in my .htaccess: php_flag
Has anyone tried migrating from ScrewTurn to Confluence ? I'm hoping that I can
We're migrating from Perforce to GIT. In perforce, there were some files that I'd

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.