• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse


  • Subject: Re: Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 17 Oct 2017 22:18:01 -0700


> On Oct 17, 2017, at 5:06 PM, email@hidden 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      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse
      • From: じょいすじょん <email@hidden>
References: 
 >Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse (From: Sebastien Boisvert <email@hidden>)
 >Re: Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse (From: Jens Alfke <email@hidden>)
 >Re: Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse (From: email@hidden)

  • Prev by Date: Re: Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse
  • Next by Date: Re: Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse
  • Previous by thread: Re: Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse
  • Next by thread: Re: Why does NSURLSession return NSURLResponse instead of NSHTTPURLResponse
  • Index(es):
    • Date
    • Thread