Multiple Requests Started

77 views
Skip to first unread message

Johnny

unread,
Jan 26, 2012, 4:12:06 PM1/26/12
to ASIHTTPRequest
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.

elviin

unread,
Feb 17, 2012, 6:34:25 AM2/17/12
to ASIHTTPRequest
Hi Johnny,

did you find the place where the issue is caused?

Thank you

Vladimir
Reply all
Reply to author
Forward
0 new messages