Table of Contents

Enum RequestMode

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The mode read-only property of the Request
interface contains the mode of the request (e.g., cors,
no-cors, same-origin, or navigate.) This is used
to determine if cross-origin requests lead to valid responses, and which properties of the response are readable.

[To("None")]
public enum RequestMode

Fields

[EnumValue("navigate")] Navigate = 0
[EnumValue("same-origin")] SameOrigin = 1
[EnumValue("no-cors")] NoCors = 2
[EnumValue("cors")] Cors = 3

Remarks

To construct a request with a specific mode, pass the desired value as the {{domxref("RequestInit", "", "mode")}} option to the Request(Union42, RequestInit) constructor.

Note that setting particular modes, especially no-cors, places restrictions on the request methods and headers that may be used, and prevents JavaScript from accessing the response headers or body. See the documentation for {{domxref("RequestInit", "", "mode")}} for more details.

-ServiceWorker API
-HTTP access control (CORS)
-HTTP

See also on MDN