Re: Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse
site_archiver@lists.apple.com Delivered-To: macnetworkprog@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=reNA7r w65C55ITEzK1fXMEbXcLkBuvaoCyLxMoJyYIw=; b=pJJDriz+//xw+Y/SeHW+Qh y9DEZJI3fYorXf4J37/QH+NFK19gKY0F6jHgHFA09welY3AOzV4xDmbEQ9gBmGJx 2XM5miZFlkwtoZmqsHyqtRioyjdMFA8i3WFsKj9pKNWy4gvoujzJ5o81f79d4Bx6 W0szlJq4YzJr3eTNmM6XkEstdPzSfZ5KzV7nl2x5NeWzcMk2ShJ2tCFfC+nuFEAf t7Bxt8QKsDgLubq7tx4eEdOJO7btgmFEmSg/o55XmowlSuJpzReYFpAC1uk7tS9J R958wYZ7gujYWojTKkkKakKdjO2bT5Tx3m6bAzaWKDNw4X9xXCgPACA1NKCpNTYA ==
On Oct 17, 2017, at 5:06 PM, dangerwillrobinsondanger@gmail.com wrote:
Isn’t NSHTTPURLResponse a subclass of NSURLResponse?
Yes it is, but calling `((NSHTTPURLResponse*)response).statusCode` will still throw an exception if the response isn’t actually an instance of the subclass, because the base class doesn’t implement that property. —Jens _______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/site_archiver%40lists... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jens Alfke