This documentation is archived and is not being maintained.

HttpPostClientProtocol Constructor

Initializes a new instance of the HttpPostClientProtocol class.

[Visual Basic]
Public Sub New()
[C#]
public HttpPostClientProtocol();
[C++]
public: HttpPostClientProtocol();
[JScript]
public function HttpPostClientProtocol();

Example

[Visual Basic] 
' Math is a proxy class derived from HttpPostClientProtocol.
Dim myHttpPostClientProtocol As New Math()

' Obtain password from a secure store.
Dim SecurelyStoredPassword As String = String.Empty

' Set the client-side credentials using the Credentials property.
myHttpPostClientProtocol.Credentials = System.Net.CredentialCache.DefaultCredentials

' Allow the server to redirect the request.
myHttpPostClientProtocol.AllowAutoRedirect = True
Console.WriteLine("Auto redirect is: " & _
    myHttpPostClientProtocol.AllowAutoRedirect)

[C#] 
// Math is a proxy class derived from HttpPostClientProtocol.
HttpPostClientProtocol myHttpPostClientProtocol = new Math();

// Obtain password from a secure store.
String SecurelyStoredPassword = String.Empty;

// Set the client-side credentials using the Credentials property.
myHttpPostClientProtocol.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Allow the server to redirect the request.
myHttpPostClientProtocol.AllowAutoRedirect = true;
Console.WriteLine("Auto redirect is: " + 
    myHttpPostClientProtocol.AllowAutoRedirect);

[C++] 
// Math is a proxy class derived from HttpPostClientProtocol.
HttpPostClientProtocol* myHttpPostClientProtocol = new ::Math();

// Obtain password from a secure store.
String* SecurelyStoredPassword = String::Empty;

// Set the client-side credentials using the Credentials property.
myHttpPostClientProtocol->Credentials = System::Net::CredentialCache::DefaultCredentials;

// Allow the server to redirect the request.
myHttpPostClientProtocol->AllowAutoRedirect = true;
Console::WriteLine(S"Auto redirect is: {0}", __box(myHttpPostClientProtocol->AllowAutoRedirect));

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

HttpPostClientProtocol Class | HttpPostClientProtocol Members | System.Web.Services.Protocols Namespace

Show: