How can I get NSURLResponse body?
问题 I'm writing an application that connect with a server using NSURLConnection . In the delegate method didreceiveresponse , if the status code is 404, I cancel the connection and I would like to show a message with a custom error that is generated in the server. The problem is that from response object, I only can get statuscode, headers, mimetype, etc. but no body. How do I get the body message from NSURLResponse ? 回答1: Why do you cancel the connection? After all, 404 can have content body as