FileWebRequest.Method Özellik
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
İstek için kullanılan protokol yöntemini alır veya ayarlar. Bu özellik gelecekte kullanılmak üzere ayrılmıştır.
public:
virtual property System::String ^ Method { System::String ^ get(); void set(System::String ^ value); };
public override string Method { get; set; }
member this.Method : string with get, set
Public Overrides Property Method As String
Bu istekte kullanılacak protokol yöntemi.
Yöntem geçersiz.
-veya-
yöntemi desteklenmiyor.
-veya-
Birden çok yöntem belirtildi.
Aşağıdaki kod örneği, istek için kullanılan protokol yöntemini ayarlar. sınıfındaki tam örne FileWebRequest bakın.
// Create a Uri object.
Uri^ myUrl = gcnew Uri( String::Format( "file://{0}", fileName ) );
// Create a FileWebRequest object.
myFileWebRequest = dynamic_cast<FileWebRequest^>(WebRequest::CreateDefault( myUrl ));
// Set the timeout to the value selected by the user.
myFileWebRequest->Timeout = timeout;
// Set the Method property to POST
myFileWebRequest->Method = "POST";
// Create a Uri object.
Uri myUrl = new Uri ("file://" + fileName);
// Create a FileWebRequest object.
myFileWebRequest = (FileWebRequest)WebRequest.CreateDefault (myUrl);
// Set the time-out to the value selected by the user.
myFileWebRequest.Timeout = timeout;
// Set the Method property to POST
myFileWebRequest.Method = "POST";
' Create a Uri object.to access the file requested by the user.
Dim myUrl As New Uri("file://" + fileName)
' Create a FileWebRequest object.for the requeste file.
myFileWebRequest = CType(WebRequest.CreateDefault(myUrl), FileWebRequest)
' Set the time-out to the value selected by the user.
myFileWebRequest.Timeout = timeout
' Set the Method property to POST
myFileWebRequest.Method = "POST"
Method özelliği şu anda sınıfı tarafından kullanılmamaktadırFileWebRequest.
Ürün | Sürümler |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET geri bildirimi
.NET, açık kaynak bir projedir. Geri bildirim sağlamak için bir bağlantı seçin: