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/LoginGo to the portal page at
/novi/StudentPortal/Home/PortalMainPageSet the student banner
/novi/StudentPortal/StudentBanner/SetStudentBanner/XXX, whereXXXis theidvalue for the row associated with the particular student in the portal pageRequest the assignments from
novi/StudentPortal/Home/LoadProfileData/Assignments(no?_=xxxxparameters needed; it looks likeAjaxLoadJavascript 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"