Table of Contents

Enum HtmxFetchMode

Namespace
Ramstack.HtmxToolkit.Configuration
Assembly
Ramstack.HtmxToolkit.dll

Specifies the request mode used by HTMX.

public enum HtmxFetchMode

Fields

SameOrigin = 0

Allows requests only to the current origin.

Cors = 1

Allows cross-origin requests using CORS.

NoCors = 2

Allows restricted cross-origin requests that produce opaque responses. Opaque responses cannot normally be swapped by HTMX.

Remarks

In HTMX 4.x this is passed as the mode option of the Fetch API.

HTMX 1.x and 2.x use XMLHttpRequest instead of fetch. Use SelfRequestsOnly or SelfRequestsOnly to restrict requests to the current origin.