I need to post data to a url and follow the redirect and then return the data returned from the server.
The problem I ran into is that the server redirects from http to https and both domains respond to their respective protocol only. And I cannot figure out how to get cUrl to change protocols.
Is there any way to follow the redirects using NSURLConnection, cURL or CURB (curl for ruby)?
I'm not to versed in cUrl and would ultimately be looking for a Ruby Curl implementation or possibly a NsURLConnection one.
I've only used NSUrlConnection to submit basic post data before. I did read the documentation on it and was able to receive a request, using
but it was not the https response, only the http one.
Any example code would be appreciated greatly.
The problem I ran into is that the server redirects from http to https and both domains respond to their respective protocol only. And I cannot figure out how to get cUrl to change protocols.
Is there any way to follow the redirects using NSURLConnection, cURL or CURB (curl for ruby)?
I'm not to versed in cUrl and would ultimately be looking for a Ruby Curl implementation or possibly a NsURLConnection one.
I've only used NSUrlConnection to submit basic post data before. I did read the documentation on it and was able to receive a request, using
Code:
-(NSURLRequest *)connection:(NSURLConnection*)connection
willSendRequest:(NSURLRequest*)request
redirectResponse:(NSURLResponse*)redirectResponse
but it was not the https response, only the http one.
Any example code would be appreciated greatly.