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
Post a Comment