Share via


HttpProtocol.IsHttp2(String) 方法

定义

返回一个值,该值指示 HTTP 请求协议是否为 HTTP/2。

public:
 static bool IsHttp2(System::String ^ protocol);
public static bool IsHttp2 (string protocol);
static member IsHttp2 : string -> bool
Public Shared Function IsHttp2 (protocol As String) As Boolean

参数

protocol
String

HTTP 请求协议。

返回

true 如果协议为 HTTP/2,则为 ;否则为 false

适用于