Trying To Make Get Request In Objc Using Nsurl
Solution 1:
Doing a little testing, i have confirmed that you have to do the following four NSURLConnection
or NSURLSession
requests:
Login at
/novi/StudentPortal/Home/Login
Go to the portal page at
/novi/StudentPortal/Home/PortalMainPage
Set the student banner
/novi/StudentPortal/StudentBanner/SetStudentBanner/XXX
, whereXXX
is theid
value for the row associated with the particular student in the portal pageRequest the assignments from
novi/StudentPortal/Home/LoadProfileData/Assignments
(no?_=xxxx
parameters needed; it looks likeAjaxLoad
Javascript used that to keep track of the requests, but we don't have to worry about that here)
I notice that if you skip either of those middle two steps, the request for the assignments will fail, as shown in your question. (Frankly, this makes me question some of the design choices in that system you're interfacing with, but I assume you have no say over that.) But if you do all four, you'll get the HTML associated with the assignments.
By the way, while parsing this HTML, you might be inclined to use NSXMLParser
or regular expressions, but I'd suggest you consider Hpple (see Ray Wenderlich's article on parsing HTML).
Post a Comment for "Trying To Make Get Request In Objc Using Nsurl"