HttpRequestMessage Sınıf

Tanım

Bir HTTP istek iletisini temsil eder.Represents a HTTP request message.

public ref class HttpRequestMessage : IDisposable
public class HttpRequestMessage : IDisposable
type HttpRequestMessage = class
    interface IDisposable
Public Class HttpRequestMessage
Implements IDisposable
Devralma
HttpRequestMessage
Uygulamalar

Açıklamalar

HttpRequestMessageSınıf, üst bilgiler, http fiili ve potansiyel veriler içerir.The HttpRequestMessage class contains headers, the HTTP verb, and potentially data.

Oluşturucular

HttpRequestMessage()

HttpRequestMessage sınıfının yeni bir örneğini başlatır.Initializes a new instance of the HttpRequestMessage class.

HttpRequestMessage(HttpMethod, String)

Bir HttpRequestMessage http yöntemiyle ve bir istekle birlikte sınıfının yeni bir örneğini başlatır Uri .Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

HttpRequestMessage(HttpMethod, Uri)

Bir HttpRequestMessage http yöntemiyle ve bir istekle birlikte sınıfının yeni bir örneğini başlatır Uri .Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

Özellikler

Content

HTTP iletisinin içeriğini alır veya ayarlar.Gets or sets the contents of the HTTP message.

Headers

HTTP istek üst bilgilerinin koleksiyonunu alır.Gets the collection of HTTP request headers.

Method

HTTP istek iletisi tarafından kullanılan HTTP yöntemini alır veya ayarlar.Gets or sets the HTTP method used by the HTTP request message.

Options
Properties
Kullanımdan kalktı.

HTTP isteği için bir özellikler kümesi alır.Gets a set of properties for the HTTP request.

RequestUri

UriHttp isteği için kullanılan öğesini alır veya ayarlar.Gets or sets the Uri used for the HTTP request.

Version

HTTP ileti sürümünü alır veya ayarlar.Gets or sets the HTTP message version.

VersionPolicy

Nasıl Version yorumlandığını ve sunucu ile son http sürümünün nasıl anlaşılıp yapıldığını belirleyen ilkeyi alır veya ayarlar.Gets or sets the policy that determines how Version is interpreted and how the final HTTP version is negotiated with the server.

Yöntemler

Dispose()

Yönetilmeyen kaynakları serbest bırakır ve tarafından kullanılan yönetilen kaynakları ortadan kaldırlar HttpRequestMessage .Releases the unmanaged resources and disposes of the managed resources used by the HttpRequestMessage.

Dispose(Boolean)

Yönetilen kaynakların ve isteğe bağlı olarak tarafından kullanılan yönetilmeyen kaynakları serbest bırakır HttpRequestMessage .Releases the unmanaged resources used by the HttpRequestMessage and optionally disposes of the managed resources.

Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.Determines whether the specified object is equal to the current object.

(Devralındığı yer: Object)
GetHashCode()

Varsayılan karma işlevi olarak işlev görür.Serves as the default hash function.

(Devralındığı yer: Object)
GetType()

TypeGeçerli örneği alır.Gets the Type of the current instance.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli bir basit kopyasını oluşturur Object .Creates a shallow copy of the current Object.

(Devralındığı yer: Object)
ToString()

Geçerli nesneyi temsil eden dizeyi döndürür.Returns a string that represents the current object.

Uzantı Metotları

GetUserPrincipal(HttpRequestMessage)

Belirtilen HTTP istek iletisiyle ilişkili Kullanıcı sorumlusunu alır.Gets the user principal associated with the specified HTTP request message.

SetUserPrincipal(HttpRequestMessage, IPrincipal)

Belirtilen HTTP istek iletisiyle ilişkilendirilen kullanıcı sorumlusunu değiştirir.Replaces the user principal associated with the specified HTTP request message.

ToMessage(HttpRequestMessage)

Örnekten bir Message örnek oluşturur HttpRequestMessage .Creates a Message instance from an HttpRequestMessage instance.

Şunlara uygulanır