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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:59:29+00:00 2026-06-08T02:59:29+00:00

I am trying to figure out how to send data to the server but

  • 0

I am trying to figure out how to send data to the server but currently without any progress.

What I know

On the server I have got some php script that return me data in response

for example with this URL: http://test.com/mobile_api/register

this script get next parameters:

id
name
info
time

so the string which I need looking like below

http://test.com/mobile_api/register?id=1000&name=alex&info=1.0&time=10000

What is best way to send this is string on the server

Now I’m trying to use ASIHTTPRequest. Can anybody send an example how to create correct request with my parameters.

  • 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-08T02:59:30+00:00Added an answer on June 8, 2026 at 2:59 am

    This sample code should help you

    -(void)sendRequest
    {
        int userId=10, time=10000;
        NSString *name = @"ABC";
        float info = 1.0;
        NSString *urlString = [NSString stringWithFormat:@"http://test.com/mobile_api/register?id=%d&name=%@&info=%f&time=%d",userId,name,info,time];
        ASIHTTPRequest *request = [[ASIHTTPRequest alloc] initWithURL:[NSURL URLWithString:urlString]];
        //You need to add ASIHTTPRequestDelegate in header(.h) file
        [request setDelegate:self];
        [request startAsynchronous];
    }
    
    - (void)requestFinished:(ASIHTTPRequest *)request
    {
        // Use when fetching text data
        NSString *responseString = [request responseString];
    
        // Use when fetching binary data
        NSData *responseData = [request responseData];
    }
    
    - (void)requestFailed:(ASIHTTPRequest *)request
    {
        NSError *error = [request error];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to send some data from a C++ server to a C# client.
I'm trying to figure out how to properly serialize my XmlDocument and send it
trying to figure out why this is happening - I have an input text
I have been trying to figure out a reliable solution in provide a drag-drop-upload
I am trying to figure out how to retrieve data from a MySQL database
I'm trying to figure out the best way to approach this. I have a
I am trying to get some data from the user and send it to
I'm trying to connect with HTTP server and send some date. My code looks
I am trying to figure out the best way to send emails from an
So I've been trying to figure out the method of posting form data from

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.