Note that there are some explanatory texts on larger screens.

plurals
  1. POAsynchronous HttpRequest using WinHttp.WinHttpRequest.5.1 in ASP
    primarykey
    data
    text
    <p>I was trying to make LINK FINDER and <strong>facing 2 issue</strong></p> <p><em>Issue 1 (Resolved)</em> :: Unable to get url of redirected page</p> <p>This was resolved <a href="https://stackoverflow.com/questions/20358654/serverxmlhttp-request-returing-data-but-not-returning-url-of-final-page-after-30">REFERNCE LINK</a> by using <strong>WinHttp.WinHttpRequest.5.1</strong></p> <p><em>Issue 2 (Unsolved)</em> :: unable to use WinHttp.WinHttpRequest.5.1 object <strong>EVENTS</strong> Or no callback to asynchronous request</p> <p><strong><em>Synchronous request code</em></strong></p> <pre><code>Set req = CreateObject("WinHttp.WinHttpRequest.5.1") req.open "GET", url, FALSE req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" req.send PostData </code></pre> <p>This is working fine but if I have multuple request , then its taking to much time.</p> <p>I have tried following <strong><em>Asynchronous request code</em></strong> but get error </p> <pre><code>Set req = CreateObject("WinHttp.WinHttpRequest.5.1") req.open "GET", url, TRUE req.OnReadyStateChange = GetRef("req_OnReadyStateChange") req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" req.send PostData Function req_OnReadyStateChange ' do something End Function </code></pre> <p><em>Code 1</em></p> <pre><code>Set req = CreateObject("WinHttp.WinHttpRequest.5.1","req_") req.open "GET", url, TRUE Function req__OnResponseFinished ' do something End Function req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" req.send PostData </code></pre> <p><strong><em>ERROR - The remote server machine does not exist or is unavailable: 'CreateObject'</em></strong></p> <p><em>Code 2</em></p> <pre><code>Set req = CreateObject("WinHttp.WinHttpRequest.5.1") req.open "GET", url, TRUE req.OnResponseFinished = GetRef("req_OnResponseFinished") Function req_OnResponseFinished ' do something End Function req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" req.send PostData </code></pre> <p><strong><em>ERROR : Object doesn't support this property or method: 'req.OnResponseFinished</em></strong></p> <p><em>Code 3</em></p> <pre><code>Set req = CreateObject("WinHttp.WinHttpRequest.5.1") req.open "GET", url, TRUE req.OnReadyStateChange = GetRef("req_OnReadyStateChange") req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" req.send PostData Function req_OnReadyStateChange ' do something End Function </code></pre> <blockquote> <p>In microsoft documentation, they have referred <em>WinHttp.WinHttpRequest.5.1</em> have 4 event. </p> </blockquote> <ol> <li>OnError </li> <li>OnResponseDataAvailable</li> <li>OnResponseFinished</li> <li>OnResponseStart</li> </ol> <p>But i didn't got example of how to use this event, nor i am able to use these event in ASP.</p> <p>Hope for quick response...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload