Ken
Ken

Reputation: 636

How do I view the response data from the server using TTURLRequest?

Is there an easy way to dump the response data from a TTURLRequest? I'm getting a server side error and I'd like to be able to quickly log the response in the console without having to tail the server logs. I'm using Three20's TTURLRequest in conjunction with TTURLJSONResponse, and so far I haven't been able to view that data easily unless the response is a JSON string. Any suggestions? Thanks!

Upvotes: 0

Views: 175

Answers (1)

Rahul Chavan
Rahul Chavan

Reputation: 510

Try to print the NSERROR

NSData *returnData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&response error:&error];

Upvotes: 1

Related Questions