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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:27:06+00:00 2026-05-26T04:27:06+00:00

people, I’m using JSON touch inmy iphone app. Now I have to send a

  • 0

people,
I’m using JSON touch inmy iphone app.
Now I have to send a string and then an array to server, how can I do this?
I get data from json requests succefully, but I have to send some data.
Here is the code I’ve got so far:

-(void)subimtSelection:(int)aNumber
{
    NSString *choiceData=[NSString stringWithFormat:@"%d", aNumber];
    NSError *theError=nil;

    [[CJSONSerializer serializer] serializeString:choiceData error:&theError];
    NSDictionary *jsDic=[NSDictionary dictionaryWithObject:choiceData
                                                    forKey:@"selection"];
    //WHAT SHOULD I DO NEXT?


}
  • 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-26T04:27:07+00:00Added an answer on May 26, 2026 at 4:27 am

    You can use ASIHTTRequest to POST string/json data to server:

        ASIHTTPRequest *request = [[ASIHTTPRequest alloc] initWithURL:@"http://server.url"];
        [request addRequestHeader:@"Accept" value:@"application/json"];
        [request addRequestHeader:@"Content-Type" value:@"application/json"];
        [request setRequestMethod:@"POST"];
        [request appendPostData:[yourJSONString dataUsingEncoding:NSUTF8StringEncoding]];
        [request startSynchronous];
    

    If you want to post a string value then try:

    [request appendPostData:@"key=value"];
    

    ASIHTTPRequest can be used in asynchronious mode as well.
    P.S. I did not tested the code, but it should work.

    To post form data you can use ASIFormDataRequest, documentation is here

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

Sidebar

Related Questions

People create their own websites using WYSIWYG creator i give them. These websites have
Some people using my app seem to be getting System.MissingMethodException: Method not found: 'System.Object
Since people are often using array.length < 1 to check if an array is
People have been developing own solutions to the following problems: Consistent messaging frameworks for
People have been embedding and executing VBScript within batch files for a long time.
people. For a academic exercise i have to implement a program in c for
People use void main() /*empty parens ()*/ I have been taught to write void
People often throw around the terms IR, ML, and data mining, but I have
EDIT: People keep visiting this post which doesn't have much good information so I'll
Many people say that you just have to add the :username attribute in the

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.