HttpContinueDelegate 委托

定义

表示当客户端接收到连续响应时通知调用方的方法。Represents the method that notifies callers when a continue response is received by the client.

public delegate void HttpContinueDelegate(int StatusCode, WebHeaderCollection ^ httpHeaders);
public delegate void HttpContinueDelegate(int StatusCode, WebHeaderCollection httpHeaders);
type HttpContinueDelegate = delegate of int * WebHeaderCollection -> unit
Public Delegate Sub HttpContinueDelegate(StatusCode As Integer, httpHeaders As WebHeaderCollection)

参数

StatusCode
Int32

服务器的 HTTP 状态的数字值。The numeric value of the HTTP status from the server.

httpHeaders
WebHeaderCollection

随 100 连续响应一起从服务器返回的标头。The headers returned with the 100-continue response from the server.

继承
HttpContinueDelegate

注解

使用 HttpContinueDelegate 指定从服务器接收到 HTTP 100-continue 响应时要调用的回调方法。Use HttpContinueDelegate to specify the callback method to be called when an HTTP 100-continue response is received from the server. 设置后,每当接收到类型 HttpStatusCode.Continue 的第一个协议响应时,就会调用该委托。When set, the delegate is called whenever the first protocol response of type HttpStatusCode.Continue is received. 这与版本 1.1 Framework 的行为发生了更改。This is a change from the behavior of the version 1.1 Framework.

事件处理程序必须声明与 HttpContinueDelegate相同的参数。Your event handler must declare the same parameters as the HttpContinueDelegate.

备注

始终 HttpStatusCode.ContinueStatusCodeStatusCode is always HttpStatusCode.Continue.

当客户端想要显示从服务器接收的数据的状态时,这非常有用。This is useful when the client wants to display the status of data being received from the server.

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于