AspHTTP Component
Copyright©
Server Objects www.serverobjects.com
Op deze pagina staan de methoden van het AspHTTP object weergegeven
en wordt er een korte beschrijving van iedere methode
gegeven.
Object creeren:
Set AspHTTP =
Server.CreateObject("AspHTTP.Conn")
Methoden:
GetURL
GetURL returns the reponse of the HTTP request. This value is a string
value and the component currently does not support binary
return values such as GIF or JPEG images.
AspHTTP.GetURL
AddExtraHeader(String)
Adds a custom HTTP header to the request. Custom headers may include
simulated browser headers such as IE's display resolution
headers.
AspHTTP.AddExtraHeader
ClearExtraHeaders
Clears any HTTP request headers that were set using
AddExtraHeader.
AspHTTP.ClearExtraHeaders
GetHeader(String)
Get's the value of a specific header after GetURL has been
called. If multiple headers have the same value GetHeader
returns the first. To search all headers see GetHeaders.
strCookie = AspHTTP.GetHeader("Set-Cookie")
'// You could then on
subsequent calls return the same cookie as follows:
If strCookie
<> "" Then
AspHTTP.AddExtraHeader
"Cookie: " & strCookie
End If
GetHREFs
After a call to GetURL you can call GetHREFs to parse any
<a href=""> tags in the HTML. GetHREFs
returns a variant array of strings that you can further
parse or display. See HREFList.asp for example code that
uses this method. GetHREFs was added in version 2.4.
AspHTTP.GetHREFs
URLDecode(strValue)
Decodes an URL encoded string
AspHTTP.URLDecode("strValue")
URLEncode(strValue)
Encodes an string to a legal URL value.
AspHTTP.URL
= AspHTTP.URLEncode("http://www.domein.nl?avalue=een
waarde met spaties")
|