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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:47:35+00:00 2026-05-31T20:47:35+00:00

Im getting data from a server by executing this code: – (void) sendGeneral:(NSString *)

  • 0

Im getting data from a server by executing this code:

- (void) sendGeneral:(NSString *) general{

    self.responseData = [NSMutableData data];

    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:CBURL]];

    [request setHTTPMethod:@"POST"];
    int i;
    i = [general length];
    NSLog(@"Length is %i", i);

    [request setHTTPBody:[general dataUsingEncoding:NSUTF8StringEncoding]];

      [[NSURLConnection alloc] initWithRequest:request delegate:self];

}

the data I’m getting after NSLog it to console containing “\r\n” as you can see from the following data (only part of the data to demonstration)

"numberPhoneFrom":"","FormName":"הרשמה\r\n"},{"CallID":314358,"StartDate":"27/07/2011 19:32","TotalTime":51.0,"numberPhoneFrom":"","FormName":"פרטים כלליים\r\n"},{"CallID":424378,"StartDate":"26/09/2011 18:43","TotalTime":63.6,"numberPhoneFrom":"","FormName":"הרשמה\r\n"},{"CallID":311229,"StartDate":"26/07/2011 13:28","TotalTime":18.6,"numberPhoneFrom":"","FormName":"נסיון\r\n"}

Im trying to clean the “\r\n” with all kind of commands but i can’t do it this code get the data in the protocol

- (void) GetData: (NSMutableString *)protocol{
     [protocol replaceOccurrencesOfString:@"\n"  withString:@"" options:0 range:NSMakeRange(0, [protocol length])]; 
      NSLog(@"server data Function%@", protocol);
} 

Getting the data back from server in hear in NSMutableString

/*****************************************************************/
/* connection finish loading and continue talk                   */
/*****************************************************************/

    - (void) connectionDidFinishLoading:(NSURLConnection *)connection {
        [connection release];

       NSMutableString* responseString = [[NSMutableString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];


      //  NSLog(@"the Server Response was %@", responseString);
         [[self delegate] GetData:responseString];


    }

can anyone help?

  • 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-31T20:47:37+00:00Added an answer on May 31, 2026 at 8:47 pm

    **Solved this issue on the server, i think this is the best thing to do’ servers are much stronger and C# is very good in string handeling

    Thank you.**

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

Sidebar

Related Questions

I am getting data from server it gives in response a NSString which hase
we have code that is getting data from the server,the data is unzipped and
I have a custom list view that is getting data from server and changing
Getting error while inserting values into database (SQL Server 2008) Implicit conversion from data
I have the following two methods for getting data from my database: - (void)
In my app in iPhone getting data from server through web services. When no
I have facing problem in listview i am getting data from server and after
My iphone app getting json data from php server. 2 basic questions, just to
i am getting web data from .net web server using NSMutableUrl request. i am
how can i getting data from listbox in second form named listform while i

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.