West Wind Internet Protocols 4.68 |
wwHTTP::HTTPGetHeader
|
In download scenarios, you might want to use the cHTTPHeaders property and the OnHTTPBufferUpdate() event to trap for the HTTP header as part of a running request. The first buffer grab returns the HTTP header.
The cHTTPHeaders property is also set by this method so passing in the 2nd and 3rd parameters is optional.
Syntax: |
o.httpgetheader(tcPage, tcHeaders, tnHeaderSize) |
| Return: | 0 on success, an error number on failure |
| Parameters: |
tcPage The Web relative page to access. @tcHeaders @tnHeaderSize
|
| Example: | oIP=create("wwHTTP")
oIP.httpconnect("www.cdw.com")
lnSize = 5000
lcHeaders = space(5000)
oIP.httpGetHeader("/",@lcHeaders,@lnSize)
? lcHeaders
? "Content Length: ",;
VAL( Extract(lcHeaders,"Content-Length:",CHR(13)) )
RETURN
|
See also: