WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestOption 方法

定义

配置 HTTP 请求的值。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Net::Http::HttpRequestMessage ^ SetBrowserRequestOption(System::Net::Http::HttpRequestMessage ^ requestMessage, System::String ^ name, System::Object ^ value);
public static System.Net.Http.HttpRequestMessage SetBrowserRequestOption (this System.Net.Http.HttpRequestMessage requestMessage, string name, object value);
static member SetBrowserRequestOption : System.Net.Http.HttpRequestMessage * string * obj -> System.Net.Http.HttpRequestMessage
<Extension()>
Public Function SetBrowserRequestOption (requestMessage As HttpRequestMessage, name As String, value As Object) As HttpRequestMessage

参数

name
String

选项的名称,该名称应与 上 https://fetch.spec.whatwg.org/#requestinit定义的键相对应。

value
Object

值,该值必须是 JSON 可序列化的。

返回

HttpRequestMessage

注解

请参阅 https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch

适用于