diff options
author | bptato <nincsnevem662@gmail.com> | 2024-05-20 18:12:09 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-05-20 18:12:09 +0200 |
commit | 7c4bb940410c8f5ad59e1d21d5565364a9a0cd71 (patch) | |
tree | d46d682ce9d4f308232c961985d8411c2a70197c /src/loader/response.nim | |
parent | 723613b0a02605dbf715d74c70b9ec29f1092c76 (diff) | |
download | chawan-7c4bb940410c8f5ad59e1d21d5565364a9a0cd71.tar.gz |
html: improve Request, derive Client from Window
* make Client an instance of Window (for less special casing) * misc work on Request & fetch * improve origin comparison (opaque origins of same URLs are now considered the same)
Diffstat (limited to 'src/loader/response.nim')
-rw-r--r-- | src/loader/response.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/loader/response.nim b/src/loader/response.nim index 63b07cf1..56e955a3 100644 --- a/src/loader/response.nim +++ b/src/loader/response.nim @@ -28,11 +28,11 @@ type #TODO fully implement headers guards HeadersGuard* = enum - GUARD_IMMUTABLE = "immutable" - GUARD_REQUEST = "request" - GUARD_REQUEST_NO_CORS = "request-no-cors" - GUARD_RESPONSE = "response" - GUARD_NONE = "none" + hgImmutable = "immutable" + hgRequest = "request" + hgRequestNoCors = "request-no-cors" + hgResponse = "response" + hgNone = "none" Response* = ref object responseType* {.jsget: "type".}: ResponseType @@ -67,7 +67,7 @@ func makeNetworkError*(): Response {.jsstfunc: "Response:error".} = responseType: TYPE_ERROR, status: 0, headers: newHeaders(), - headersGuard: GUARD_IMMUTABLE + headersGuard: hgImmutable ) func sok(response: Response): bool {.jsfget: "ok".} = |