AspHTTP Component
Copyright©
Server Objects www.serverobjects.com
Op deze pagina staan de eigenschappen van het AspHTTP object
weergegeven en wordt er een korte beschrijving van iedere
eigenschap gegeven.
Object creeren:
Set AspHTTP =
Server.CreateObject("AspHTTP.Conn")
Eigenschappen:
Accept
The Accept
property indicates what kind of MIME types can be accepted
by the requesting program.
AspHTTP.Accept
= "*/*"
Authorization
The
Authorization header allows you to retrieve URLs that are
located in authenticated areas. To use the Authorization
property set this property to the username and password,
seperated by a colon ":", for the password
protected area.
AspHTTP.Authorization
= "naam:password"
BinaryData
Returns the data available from the GetURL request in binary
form. You can use this property to grab binary data such as
images off another server.
<%
Response.ContentType
= "image/gif"
Set HTTPObj = Server.CreateObject("AspHTTP.Conn")
HTTPObj.Url =
"http://www.domein.nl/images/image.gif"
HTTPObj.GetURL
Response.BinaryWrite
AspHTTP.BinaryData
%>
ContentType
The ContentType property allows you to specify custom
content-type headers during a POST operation.
AspHTTP.ContentType
= "application/x-www-form-urlencoded"
Error
Reports any errors that may occur during the request.
AspHTTP.Error
FollowRedirects
FollowRedirects tells the component to follow redirect
responses from the HTTP server.
AspHTTP.FollowRedirects
= True
Headers
The Headers property contains the response headers from the
HTTP request after the request has been completed by a call
to the GetURL method.
Response.Write
AspHTTP.Headers
Port
The Port property indicates which port to contact the HTTP
server on.
AspHTTP.Port
= 80
PostData
The PostData property should be set to the values of the
data that you want to post to the server for a post request.
AspHTTP.PostData
= "suid=naam&act=upd"
Protocol
The Protocol property indicates what version of HTTP the
request should be made using. By default Protocol is
HTTP/1.0
AspHTTP.Protocol
= "HTTP/1.1"
Proxy
The proxy property contains the address and port of the
proxy server seperated by a colon.
AspHTTP.Proxy
= "domein.nl:2001"
ProxyPassword
Sets the HTTP Proxy password for HTTP proxy servers that
require authentication. Only basic authentication is
currently supported.
AspHTTP.ProxyPassword
= "wachtwoord"
RequestMethod
The RequestMethod property indicates what type of HTTP
request should be made to the server. Legal values are
"GET", "POST" and "HEAD".
AspHTTP.RequestMethod
= "POST"
RegisteredUser
The RegisteredUser property indicates the name the component
is licensed to.
Response.Write
"De licentiehouder is " & AspHTTP.RegisteredUser
Response
The Response property contains the HTTP response after a
request has been received from a Web server.
Response.Write
AspHTTP.Response
SaveFileTo
The SaveFileTo allows you to retrieve files of any type and
have them automatically saved to a local disk. This allows
you to retrieve binary files such as images, as well as text
files, like HTML files. To use the SaveFileTo property set
the value of SaveFileTo to the name of the local directory
and file name where the requested URL should be saved. Be
sure the user has security rights that allow the writing of
the file.
AspHTTP.SaveFileTo
= "c:\images\image.jpg"
TimeOut
The timeout property determines how long the component
should wait for a response from the HTTP server.
AspHTTP.TimeOut
= 45
URL
The URL property should be set to the URL you wish the
request to operate upon. URLs should be preceded with
http://.
AspHTTP.URL
= "http://www.domein.nl/scripts/pagina.asp"
UserAgent
The UserAgent property allows the component to impersonate
browsers by sending a UserAgent header in the request.
AspHTTP.UserAgent
= "Mozilla Compatible (MS IE 3.01 WinNT)"
Version
The version property indicates the internal version of the
AspHTTP component.
Response.Write
"Het versienummer van dit component is " & AspHTTP.Version
|