If you feel some confusion about any thing or if you do not find what you are looking for, please inform us so that we can improve our documentation accordingly. docs@aspfusion.net

AdvHTTP 

The component provides you complete client for HTTP protocol. Access to the component can also be turned on at website basis like all other ASPFusion components. The component is very easy to use and is more flexible for implementing client for HTTP. Will let you set the user agent name, set referrer, set protocol version as HTTP/1.0, set proxy server settings. This control provides easy, high-level access to the complete HTTP client protocol. Retrieving pages, submitting forms along with multiple form variables and multiple files, etc, are well supported. Your web-based applications will download faster. It provides following operations.

  1. Get for performing Get method of HTTP.

  2. Post for performing Post method for HTTP.

<%set Obj = Server.CreateObject("AdvHTTP.HTTP")%> 

AdvHTTP Properties 

Property

Description

ErrorReason

Reports any errors that occur during the request
Example:
<%if Obj.IsError = 1 then
        Response.Write Obj.ErrorReason
else
        No Error
end if %>

IsError

Returns 1 if any error occur during the request otherwise 0
Example:
<%if Obj.IsError = 1 then
        Error
else
        No Error
end if %>

Password

When required by a server, a valid password
Example:
<%Obj.Password = “Password”%>

Path

The path to the directory in which a file is to be stored 
Example:
<%Obj.Path = “C:\Temp”%>

Port

The port number on the server from which the object is being requested. Default port is 80.
Example:
<%Obj.Port = 80%>

Protocol

The Protocol property indicates what version of HTTP the request should be made using. Default Protocol is HTTP/1.0
Example:
<%
Obj.Protocol = “HTTP/1.1”%>

ProxyPort

The port number on the proxy server from which the object is being requested. Default port is 80.
Example:
<%Obj.ProxyPort = 8080%>

ProxyServer

The proxy server address
Example:
<%Obj.ProxyServer = "address.com"%>

Referrer

Address of a string that specifies the address (URL) of the document from which the URL in the request was obtained
Example:

<%
Obj.Referrer = “Address URL”%>

SaveToFile

The filename to be used for the file that is accessed
Example:
<%Obj.SaveToFile = “Testing.htm”%>

URL

Full URL of the host name or IP address of the server on which the file resides
Example:
<%Obj.URL = “http://www.advcomm.net”%>

UserAgent

User agent request header
Example:
<%Obj.UseAgent = “User Agent”%>

UserName

When required by a server, a valid username
Example:
<%Obj.UserName = “Test”%>

AdvHTTP Methods 

Method

Parameter

Return Value

Description

File

Name
Path

None

Post the file specified in Path parameter with name specified in Name parameter
Example:
<%Obj.File Name, Path%>

FormField

Name
Value

None

Post form fields with specified name and value
Example:
<%Obj.FormField Name, Value%>

Get

None

None

Perform GET method 
Example:
<%Obj.Get()%>

Post

None

None

Perform POST method
Example:
<%Obj.Post()%>

URLField

Name
Value

None

Post form fields with specified name and value
Example:
<%Obj.URLField Name, Value%>

Back 

Copyright © 2000, Advanced Communications