Reputation: 11
For secure HTTPS request from iPhone, I am using the technique mentioned in this question.
But I am still confused on the flow to request response.
As per my understanding
If this flow is correct then the first request will go as a normal HTTP request. and all subsequent requests will go as HTTPS requests.
Please guide me if am wrong.
If there is any good article about how to connect to server in HTTPS mode without using browser, please let me know.
Upvotes: 1
Views: 238
Reputation: 299345
Your understanding here isn't correct. All connections with be HTTPS if you request HTTPS. That has nothing to do with didReceiveAuthenticationChallenge:
. You can receive an authentication challenge over any protocol.
If you are not doing any special certificate handling, using NSURLConnection
over HTTPS and HTTP are identical. See the URL Loading System Programming Guide for full details on it. For the above situation, see the section "Authentication Challenges."
If you're looking to do more complex things with NSURLConnection
and HTTPS, particularly dealing with HTTP certificates, iOS5:PTL covers this extensively in Chapter 11. But this isn't necessary for day-to-day HTTPS work.
Upvotes: 1