java - How to print TEXT_PLAIN format http response received data on iphone simulator using Xcode 4? -


i communicating apache server via iphone simulator. when sending request simulator, apache server sucessfully responding. checked via installing wireshark on mac(client), unable print response value in xcode console or in iphone simulator.

my response reciving code on client side-:

// checking connection 1   -(void)connection:(nsurlconnection *)connection didreceiveresponse:(nsurlresponse *)response {      _responsedata = [[nsmutabledata alloc]init];     nslog(@"%s checking data ...",_responsedata.superclass); }  -(void)connection:(nsurlconnection *)connection didreceivedata:(nsdata *)data {     [_responsedata appenddata:data];      nslog(@"apended data.. %d.........%s",data,data);  }  -(nscachedurlresponse *)connection:(nsurlconnection *)connection willcacheresponse:(nscachedurlresponse *)cachedresponse {     return nil;  } 

my request responding code server side (java) -:

@get   @produces(mediatype.text_plain)   public string sayplaintexthello() {       system.out.println("request received inside text plain method");        string ram = "hello jersey";     return ram;   } 

on client side (iphone simulator) receiving rseponse in http text plain format, please suggest me how print response value sucessfully. getting " ?? " in response.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -