Using JavaScript in HomeSite 4.0, Part III: The HTTPProvider Object's Properties, Part I | WebReference

Using JavaScript in HomeSite 4.0, Part III: The HTTPProvider Object's Properties, Part I


Using JavaScript in HomeSite 4.0, Part III

The HTTPProvider Object's Properties, Part I

The HTTPProvider object is a general purpose HTTP protocol object. Its properties and methods allow you to do many low level HTTP operations. The main Application object supports only a few HTTP-related methods such as GetURL, but the HTTPProvider object supports many low level HTTP provider properties such as Proxy, ProxyPort, Username, and Password, as well as methods such as Get(), Post(), and Head(). In the next few pages we'll describe its properties as well as its methods. Let's start with HTTPProvider object's properties.

URL Read-Write String

Sets/returns the URL location of the server with which an HTTP protocol is to be established. The following line sets the URL property:

app.HTTPProvider.URL = "http://www.microsoft.com";

Username Read-Write String

Sets/returns the username of the account with which an HTTP protocol is to be established. The following line sets the Username property:

app.HTTPProvider.Username = "docjavascript";

Password Read-Write String

Sets/returns the password of the account with which an HTTP protocol is to be established. The following line sets the Password property:

app.HTTPProvider.Password = "tipoftheday";

Proxy Read-Write String

Sets/returns the proxy server through which an HTTP protocol is to be established. The following line sets the Proxy property:

app.HTTPProvider.Proxy = "proxy.microsoft.com";

ProxyPort Read-Write String

Sets/returns the proxy server port through which an HTTP protocol is to be established. The following line sets the ProxyPort property:

app.HTTPProvider.ProxyPort = 81;

ProxyUsername Read-Write String

Sets/returns the proxy server username. The following line sets the ProxyUsername property:

app.HTTPProvider.ProxyUsername = "docjavascript";

http://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

Created: October 11, 1999
Revised: October 11, 1999

URL: http://www.webreference.com/js/column50/httpprop1.html