HttpResponseMessage Sınıf
Tanım
Durum kodu ve verileri içeren bir HTTP yanıt iletisini temsil eder.Represents a HTTP response message including the status code and data.
public ref class HttpResponseMessage : IDisposable
public class HttpResponseMessage : IDisposable
type HttpResponseMessage = class
interface IDisposable
Public Class HttpResponseMessage
Implements IDisposable
- Devralma
-
HttpResponseMessage
- Uygulamalar
Açıklamalar
Yöntemlerinden birini almanın yaygın bir yolu HttpResponseMessage HttpClient.SendAsync(HttpRequestMessage) .A common way to get an HttpResponseMessage is from one of the HttpClient.SendAsync(HttpRequestMessage) methods.
Oluşturucular
| HttpResponseMessage() |
HttpResponseMessage sınıfının yeni bir örneğini başlatır.Initializes a new instance of the HttpResponseMessage class. |
| HttpResponseMessage(HttpStatusCode) |
Sınıfının yeni bir örneğini HttpResponseMessage belirli bir ile başlatır StatusCode .Initializes a new instance of the HttpResponseMessage class with a specific StatusCode. |
Özellikler
| Content |
Bir HTTP yanıt iletisinin içeriğini alır veya ayarlar.Gets or sets the content of a HTTP response message. |
| Headers |
HTTP yanıt üst bilgileri koleksiyonunu alır.Gets the collection of HTTP response headers. |
| IsSuccessStatusCode |
HTTP yanıtının başarılı olup olmadığını gösteren bir değer alır.Gets a value that indicates if the HTTP response was successful. |
| ReasonPhrase |
Genellikle, sunucu tarafından durum kodu ile birlikte gönderilen neden tümceciğini alır veya ayarlar.Gets or sets the reason phrase which typically is sent by servers together with the status code. |
| RequestMessage |
Bu yanıt iletisine işaret eden istek iletisini alır veya ayarlar.Gets or sets the request message which led to this response message. |
| StatusCode |
HTTP yanıtının durum kodunu alır veya ayarlar.Gets or sets the status code of the HTTP response. |
| TrailingHeaders |
Bir HTTP yanıtında yer alan sondaki üstbilgilerin koleksiyonunu alır.Gets the collection of trailing headers included in an HTTP response. |
| Version |
HTTP ileti sürümünü alır veya ayarlar.Gets or sets the HTTP message version. |
Yöntemler
| Dispose() |
Yönetilmeyen kaynakları serbest bırakır ve tarafından kullanılan yönetilmeyen kaynakları ortadan kaldırlar HttpResponseMessage .Releases the unmanaged resources and disposes of unmanaged resources used by the HttpResponseMessage. |
| Dispose(Boolean) |
Yönetilen kaynakların ve isteğe bağlı olarak tarafından kullanılan yönetilmeyen kaynakları serbest bırakır HttpResponseMessage .Releases the unmanaged resources used by the HttpResponseMessage and optionally disposes of the managed resources. |
| EnsureSuccessStatusCode() |
IsSuccessStatusCodeHttp yanıtı özelliği ise bir özel durum oluşturur |
| 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ı
| ToMessage(HttpResponseMessage) |
Örnekten bir Message örnek oluşturur HttpResponseMessage .Creates a Message instance from an HttpResponseMessage instance. |