I found breakpoint to be very convenient for getting rid of all NSLog statements trough all my code. This time I am looking for a way to print the html response coming from an NSRequest in a breakpoint.
Assuming returnData is the variable returned from my NSRequest, I have tried to add a breakpoint with a debugger command like this:
po (@"%@", returnData)
but it's giving me the whole HEX response
I then tried with this
po ([[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding])
but I am getting an error: use of undeclared identifier 'NSUTF8StringEncoding'
NSUTF8StringEncoding is an NSUInteger, in NSString.h you can see the value is 4, so you could do this
po [[NSString alloc] initWithData:returnData encoding:4]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With