| Dart Home | PowerTCP Web Enterprise for ActiveX | Custom Development | Reply | PowerTCP Web Enterprise for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Web Enterprise for ActiveX Topic: WebASP async GET request - no data returned |
| bigmannz From: Redmond, Venezuela Posts: 4 Member Since: 10/14/02 |
posted October 14, 2002 8:34 PM I have the below code in a class, which gets an instance of created from frmMain, and the Start method is called. It runs through each state correctly (1,2,3,0), the error event dosn't get called, the Trace log shows all the html it has retrieved correctly, yet the length of Response.Body.ReadString is allways zero, no html ever comes out of it! Curiously, if the filename property is set after the request completes (uncomment the line below), the correct html gets saved to disk. I am eventually wanting to create a control array of about 10 WebASP's to do multithreaded requests but am not yet satisfied with the componants functionality. Any clues? (using trial version for 30days) Public Sub Start() With h1 Debug.Print "getting au.yahoo.com" .Timeout = 0 .Request.Url = "au.yahoo.com" .Get End With End Sub Private Sub h1_Progress(ByVal Method As DartWebASPCtl.WebMethodConstants, ByVal Status As DartWebASPCtl.WebStatusConstants, ByVal Count As Long, ByVal Size As Long) Dim s As String Debug.Print "H1 progress event firing, status= " & Status & " count= " & Count & " size= " & Size If Status = webOk Then 'h1.Response.Body.fileName = App.path & "\debug.htm" s = h1.Response.Body.ReadString Debug.Print "Length of response = " & Len(s) Debug.Print s End If End Sub |
| bigmannz From: Redmond, Venezuela Posts: 4 Member Since: 10/14/02 |
posted October 14, 2002 9:11 PM Have found that if I do the following before trying to do a ReadString, then data can be returned; h1.Response.Body.Position = 0 It seems the Position is allways set to be at the very end of the buffer - is this correct behaviour? why is it not documented? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted October 14, 2002 9:43 PM That's the normal behavior for a stream. When you set the filename, we set the position back to zero, then write the file. |
| Reply | PowerTCP Web Enterprise for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|