Post Request with Swift Doesn't work

2019-09-19 12:20发布

问题:

In my first question I had an error and it has been fixed, but now there is no error but nothing happends. I want to show all the components of this table on here http://blich.iscool.co.il/tabid/2117/language/he-IL/Default.aspx/ but with my gui and other stuff, I want just to pull out information from that table to my app. But, I have a problem I want to pull out the right information from that table, because if you click for example on the rightest button called "מערכת שינויים" the table appears, but the url doesn't change so it is POST method, whit my chrome I checked which parameters are called in that POST method, It showed me this:

I want my application to do all the POST requests and print the response,so with this helping file for doing posts and gets I wrote this code:

func postR(){
    SRWebClient.POST("http://blich.iscool.co.il/tabid/2117/language/he-IL/Default.aspx/").data(["__EVENTTARGET":"dnn$ctr7919$TimeTableView$btnChangesTable","__LASTFOCUS":"","__VIEWSTATE":"/wEPDwUIMjU3MTQzOTcPZBYGZg8WAh4EVGV4dAU+PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwvL0VOIj5kAgEPZBYMAgEPFgIeB1Zpc2libGVoZAICDxYCHgdjb250ZW50BQjXkdec15nXmmQCAw8WAh8CBQjXkdec15nXmmQCBA8WAh8CBSDXm9ecINeU15bXm9eV15nXldeqINep157Xldeo15XXqmQCBQ8WBB8CZB8BaGQCBg8WAh8CBQjXkdec15nXmmQCAg9kFgJmD2QWAgIED2QWAmYPZBYOAgEPZBYCAgEPZBYIAgEPDxYCHwFoZGQCAw8PFgIfAWhkZAIFD2QWAgICDxYCHwFoZAIHD2QWAgIBD2QWAgIBD2QWCmYPEGQQFQAVABQrAwBkZAIDDxYCHwFoZAIEDxYCHwFoZAIGD2QWAmYPZBYgZg9kFgICAQ8QZBAVPQbXmCAtIDEG15ggLSAyBteYIC0gMwbXmCAtIDQG15ggLSA1BteYIC0gNgbXmCAtIDcG15ggLSA4BteYIC0gOQfXmCAtIDEwB9eYIC0gMTEH15ggLSAxMgfXmCAtIDEzB9eYIC0gMTQH15ggLSAxNQbXmSAtIDEG15kgLSAyBteZIC0gMwbXmS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GQCDA8WAh8DBQpIZWFkZXJDZWxsZAIODxYCHwMFCkhlYWRlckNlbGxkAhAPFgQfAwUKSGVhZGVyQ2VsbB8BaGQCEQ8WAh8BaGQCEg8WBB8DBQpIZWFkZXJDZWxsHwFoZAITDxYCHwFoZAIUDxYEHwMFCkhlYWRlckNlbGwfAWhkAggPDxYCHwAFOtee16LXldeT15vXnyDXnDogMDYuMDUuMjAxNSwg16nXoteUOiAyMjo0OSwg157XodeaOiBBMzc5MTlkZAIDDxYCHwMFGXRvcHJpZ2h0cGFuZSBETk5FbXB0eVBhbmVkAgUPFgIfAwUYdG9wbGVmdHBhbmUgRE5ORW1wdHlQYW5lZAIHDxYCHwMFFnJpZ2h0cGFuZSBETk5FbXB0eVBhbmVkAgkPFgIfAwUYY29udGVudHBhbmUgRE5ORW1wdHlQYW5lZAILDxYCHwMFFWxlZnRwYW5lIEROTkVtcHR5UGFuZWQCDQ8WAh8DBRdib3R0b21wYW5lIEROTkVtcHR5UGFuZWRk27oj0maYUABIV9oq6gpKrXwfOiI=","__VIEWSTATEGENERATOR":"CA0B0334","dnn$ctr7919$TimeTableView$ClassesList":"5","dnn$ctr7919$TimeTableView$MainControl$WeekShift":"0","dnn$ctr7919$TimeTableView$ControlId":"8"]).send({(response:AnyObject!, status:Int) -> Void in
            //this is success part
            println(response)
            }, failure:{(error:NSError!) -> Void in
                //this is failure part
                println(error)
        })
}

to see the code better:

but the output(the response) is wrong and different from the output that chrome gets and I want to receive what chrome gets, THANKS!!!