So I am trying to connect to my company's website through an HTTP authentication request. The problem is, in order to validate, it has to go through a series of redirects and gather 2 cookies along the way. Does anyone know if the ASI libraries found here have a way of handling this sort of thing?
For example, does the request traverse the redirects automatically? I mean I set the username and password for the request for the login page, but I am not sure how to make it do anything from there. I have solved this problem in Java, but am relatively new to iPad/Objective-c programming Any hel开发者_如何学Gop in this whatsoever would be greatly appreciated. Thanks!
When I've had to do this type of automated web form login coding before, I normally code it up as an OSX app and use HTTPScoop to see what's going on with the requests. You can just login with your browser with HTTPScoop running to see what the browser is sending and then mimic that with your code. Once I have it working on OSX, I move the code into the iPhone/iPad app. This seems to work pretty well. ASIHTTPRequest works on both OSX and iOS so porting it over once it's working on OSX is trivial.
精彩评论