Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/ResponseOptions.cs
MDN Reference: ResponseOptions on MDN
An options object containing settings for the response, including the status code, status text, and headers. https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static#options
| Property | Type | Access | Description |
|---|---|---|---|
ResponseOptions |
class |
get | An options object containing settings for the response, including the status code, status text, and headers. https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static#options |
StatusText |
string? |
get | |
Headers |
Union<Dictionary<string, string>, Headers>? |
get |
SpawnDev.SpawnJS Mapping Note: The JavaScript examples below show the standard Web API usage. In SpawnDev.SpawnJS, the same API is available with C# conventions:
- Properties and methods use PascalCase (e.g.,
readyStatebecomesReadyState)- Events use ActionEvent with
+=/-=(e.g.,addEventListener("click", fn)becomesOnClick += handler)- Async methods return
Task<T>instead ofPromise<T>- Objects should be disposed with
usingstatements- Access via
JS.Get<ResponseOptions>(...)or constructornew ResponseOptions(...)
const myBlob = new Blob();
const myOptions = { status: 200, statusText: "SuperSmashingGreat!" };
const myResponse = new Response(myBlob, myOptions);