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

  • Home
  • SEARCH
  • 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 8401731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:52:51+00:00 2026-06-09T21:52:51+00:00

I am developing an application with REST full web service .Now i have some

  • 0

I am developing an application with REST full web service .Now i have some problem in this case ,ie string sent to a servier using put method. I am using the following code.

NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://176.31.113.164/app/profil/add"]];
    [request setValue:@"Digest adf@email.com:test" forHTTPHeaderField:@"Authorization"];
     [request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
     [request setValue:@"application/json" forHTTPHeaderField:@"content-type"];
    //[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
    NSDictionary *dic=[[NSDictionary alloc]init ];
        dic=[NSDictionary dictionaryWithObjectsAndKeys:@"15",@"@idUsers",@"17",@"@idProfils",@"ddduu",@"address",@"ddd",@"city",@"ddd",@"country",@"adf@email.com <mailto:adf@email.com>",@"email",@"1",@"enabled",@"fff55",@"firstName",@"fffdd3",@"lastName",@"fffffcc",@"nickName",@"test",@"password",@"0",@"phone",@"0",@"postCode",@"ROLE_USER",@"role", nil];
    NSString *jsonString = [jsonWriter stringWithObject:dic];
     NSData *postData= [jsonString dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];
     [request setHTTPBody:postData];
        [request setHTTPMethod:@"PUT"];
    [request setValue:postLength forHTTPHeaderField:@"Content-Length"];

        NSURLConnection* _loginConnection=[[NSURLConnection alloc] initWithRequest:request delegate:self];
     if (_loginConnection==NULL)
        {
            NSLog(@"Problem");
        }
    [_loginConnection start];

The received data is handled as this:

NSString* tempString =[NSJSONSerialization 
                  JSONObjectWithData:_receivedData 

                  options:kNilOptions 
                  error:&error];
  • 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-09T21:52:52+00:00Added an answer on June 9, 2026 at 9:52 pm

    You can use ASIHTTP wrapper class to perform REST operations in your iOS application.

    Download the latest ASIHTTP from here.

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

Sidebar

Related Questions

I'm developing an Java Web Application, I used some jQuery and a REST web
I'm developing an application, that makes use of some REST web services. It's technical
We are developing a REST based application using Visual Studio 2010, using asp.net web
I'm developing an Android application which sends content to a server using rest web
I'm developing a web application with jax-rs, i made a rest client with jquery.
I've been implementing a GWT application that calls a REST-service (which we're also developing).
I am developing an Android application and I have some data saved locally in
I'm developing an application which use HTTP REST API .I'm load response to string
I am developing an application with Play 2.0 and Scala that exposes some REST
I am developing a REST API layer for my application using Zend_Rest_Controller. I have

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.