共用方式為


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

適用於