Udostępnij przez


HttpWorkerRequest.SendCalculatedContentLength Metoda

Definicja

Content-Length Dodaje nagłówek HTTP do odpowiedzi.

Przeciążenia

SendCalculatedContentLength(Int32)

Content-Length Dodaje nagłówek HTTP do odpowiedzi dla treści komunikatów, które są mniejsze lub równe 2 GB.

SendCalculatedContentLength(Int64)

Content-Length Dodaje nagłówek HTTP do odpowiedzi dla treści komunikatów, które są większe niż 2 GB.

SendCalculatedContentLength(Int32)

Content-Length Dodaje nagłówek HTTP do odpowiedzi dla treści komunikatów, które są mniejsze lub równe 2 GB.

public:
 virtual void SendCalculatedContentLength(int contentLength);
public virtual void SendCalculatedContentLength (int contentLength);
abstract member SendCalculatedContentLength : int -> unit
override this.SendCalculatedContentLength : int -> unit
Public Overridable Sub SendCalculatedContentLength (contentLength As Integer)

Parametry

contentLength
Int32

Długość odpowiedzi w bajtach.

Uwagi

Jeśli długość zawartości nie jest jawnie ustawiona, ta metoda umożliwia HttpWorkerRequest wystąpieniu dodanie Content-Length nagłówka HTTP do odpowiedzi.

Użyj tego przeciążenia, aby ustawić Content-Length nagłówek, gdy długość treści komunikatu odpowiedzi jest mniejsza lub równa 2 GB.

Zobacz też

Dotyczy

SendCalculatedContentLength(Int64)

Content-Length Dodaje nagłówek HTTP do odpowiedzi dla treści komunikatów, które są większe niż 2 GB.

public:
 virtual void SendCalculatedContentLength(long contentLength);
public virtual void SendCalculatedContentLength (long contentLength);
abstract member SendCalculatedContentLength : int64 -> unit
override this.SendCalculatedContentLength : int64 -> unit
Public Overridable Sub SendCalculatedContentLength (contentLength As Long)

Parametry

contentLength
Int64

Długość odpowiedzi w bajtach.

Uwagi

Jeśli długość zawartości nie jest jawnie ustawiona, ta metoda umożliwia HttpWorkerRequest wystąpieniu dodanie Content-Length nagłówka HTTP do odpowiedzi. Domyślna implementacja wywołuje przeciążenie, które przyjmuje contentLength parametr typu Int32.

Użyj tego przeciążenia, aby określić odpowiedź treści komunikatów większą niż 2 GB.

Zobacz też

Dotyczy