First, you should not send synchronous requests. This is completely unacceptable from a user experience perspective. Use it only for testing.
Second, you are sort of duplicating the request by sending it via NSURLConnection
and the web view. Either you load the result in the return value of your connection call (it is of type NSData
and you are ignoring it); or you just call the web view loadRequest
(which is asynchronous).
Third, you should include the hidden
data fields. In all likelihood your web server needs those to give a valid response.