Share via


WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestOption Method

Definition

Configures a value for the HTTP request.

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

Parameters

name
String

The name of the option, which should correspond to a key defined on https://fetch.spec.whatwg.org/#requestinit.

value
Object

The value, which must be JSON-serializable.

Returns

The HttpRequestMessage.

Remarks

See https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch.

Applies to