Good Afternoon,
This could be a simple problem, but I honestly have no idea.
Short Explanation of Issue:
Sending a POST request and seeing - (void)requestStarted:
(ASIHTTPRequest *)request; being called twice.
Detail Explanation of Issue:
I am trying to download a file via POST. (Yes I know this is quite
unorthodox, but it is what the company wants.) When I send the
request, I'm seeing two "Request Started" messages being printed out
to the console from - (void)requestStarted:(ASIHTTPRequest *)request.
I am saving the responses to response.txt. After the first "Request
Started" message, there is a response.txt is a 4kb file that appears
to be HTML source for a 401 - Unauthorized web page. After the second
"Request Started" message, I receive a "Request Finished" and
response.txt becomes the file I had originally wanted to download.
Copy of Code Creating Request:
https://gist.github.com/04c477231bae3c27b7dc
Question:
Why is - (void)requestStarted:(ASIHTTPRequest *)request being called/
ran twice? Is it because the request needed to present a username and
password?
Thanks in advance.