Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: Can you download incomplete content with dartweb?
vaxop

From: california, AB USA
Posts: 1
Member Since: 04/08/05
posted April 8, 2005 10:28 PM

Lets say you only need to download the first 5000 bytes of a webpage.. how can you do this?
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted April 11, 2005 9:46 AM

Hi,
There is a Range header that you can add to the request.
You will need to reference the DartSock.dll in your project (Dart Tcp, Udp, Daemon controls), and then use the DartStrings object to add the header.
You can then use the GetEx method to send the GET.
For example:

Dim content As String
Dim reqHeaders As New DartStrings
reqHeaders.Add "Range: bytes=0-5000"
Http1.GetEx reqHeaders, content

-ken
Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX