HttpGetClientProtocol Constructor
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Inicializa una nueva instancia de la clase HttpGetClientProtocol.
public:
HttpGetClientProtocol();
public HttpGetClientProtocol ();
Public Sub New ()
Ejemplos
// Math is a proxy class derived from HttpGetClientProtocol.
HttpGetClientProtocol^ myHttpGetClientProtocol = gcnew ::Math;
// Obtain password from a secure store.
String^ SecurelyStoredPassword = String::Empty;
// Set the client-side credentials using the Credentials property.
ICredentials^ credentials = gcnew NetworkCredential( "Joe","mydomain",SecurelyStoredPassword );
myHttpGetClientProtocol->Credentials = credentials;
Console::WriteLine( "Auto redirect is: {0}", myHttpGetClientProtocol->AllowAutoRedirect );
}
// Math is a proxy class derived from HttpGetClientProtocol.
HttpGetClientProtocol myHttpGetClientProtocol = new Math();
// Obtain password from a secure store.
String SecurelyStoredPassword = String.Empty;
// Set the client-side credentials using the Credentials property.
ICredentials credentials =
new NetworkCredential("Joe", "mydomain", SecurelyStoredPassword);
myHttpGetClientProtocol.Credentials = credentials;
Console.WriteLine("Auto redirect is: "
+ myHttpGetClientProtocol.AllowAutoRedirect);
}
}
' Math is a proxy class derived from HttpGetClientProtocol.
Dim myHttpGetClientProtocol As New Math()
' Obtain password from a secure store.
Dim SecurelyStoredPassword As String = String.Empty
' Set the client-side credentials using the Credentials property.
Dim credentials = _
New NetworkCredential("Joe", "mydomain", SecurelyStoredPassword)
myHttpGetClientProtocol.Credentials = credentials
' Allow the server to redirect the request.
myHttpGetClientProtocol.AllowAutoRedirect = True
Console.WriteLine("Auto redirect is: " _
& myHttpGetClientProtocol.AllowAutoRedirect)