Enum HtmxFetchMode
- Namespace
- Ramstack.HtmxToolkit.Configuration
- Assembly
- Ramstack.HtmxToolkit.dll
Specifies the request mode used by HTMX.
public enum HtmxFetchMode
Fields
SameOrigin = 0Allows requests only to the current origin.
Cors = 1Allows cross-origin requests using CORS.
NoCors = 2Allows 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.