HttpPostClientProtocol Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the HttpPostClientProtocol class.
public:
HttpPostClientProtocol();
public HttpPostClientProtocol ();
Public Sub New ()
Examples
// Math is a proxy class derived from HttpPostClientProtocol.
HttpPostClientProtocol^ myHttpPostClientProtocol = gcnew ::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: {0}", myHttpPostClientProtocol->AllowAutoRedirect );
// 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);
' 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)
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.