about summary refs log tree commit diff stats
path: root/src/io/request.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-08-28 22:33:31 +0200
committerbptato <nincsnevem662@gmail.com>2023-08-28 22:38:00 +0200
commit1422f3393301cd6105b3939be194c7c119fcf967 (patch)
tree32969f2af8fe5293c13215a84229915a7970e828 /src/io/request.nim
parentba2a62f6d3a2879c9506ea3fb5aa5552fc4674d9 (diff)
downloadchawan-1422f3393301cd6105b3939be194c7c119fcf967.tar.gz
javascript: refactor
Split out parts of the JS module, because it was starting to confuse
the compiler a little.

(Peakmem is back at 750M. Interesting.)
Diffstat (limited to 'src/io/request.nim')
-rw-r--r--src/io/request.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/io/request.nim b/src/io/request.nim
index f609360b..6b89eb6b 100644
--- a/src/io/request.nim
+++ b/src/io/request.nim
@@ -5,6 +5,7 @@ import tables
 
 import bindings/quickjs
 import io/headers
+import js/error
 import js/javascript
 import types/formdata
 import types/url
@@ -194,7 +195,7 @@ func createPotentialCORSRequest*(url: URL, destination: RequestDestination, cors
 
 #TODO init as an actual dictionary
 func newRequest*[T: string|Request](ctx: JSContext, resource: T,
-    init = none(JSValue)): Result[Request, JSError] {.jsctor.} =
+    init = none(JSValue)): JSResult[Request] {.jsctor.} =
   when T is string:
     let url = ?newURL(resource)
     if url.username != "" or url.password != "":
n/blame/src/io/posixstream.nim?id=9b5df91240ea3e38e58d771597cb2a2c3ca95f29'>^
1e858c87 ^
7b6a2c6d ^


4e690f15 ^
7b6a2c6d ^
7b6a2c6d ^





2e1f3147 ^

1c0df44a ^

7b6a2c6d ^


7cb7ea1d ^









547a4926 ^





407b5253 ^
407b5253 ^




afafcaf1 ^


b789b0b0 ^


d8c4b097 ^
547a4926 ^
d8c4b097 ^





b789b0b0 ^


547a4926 ^








78ffc938 ^






547a4926 ^
1e858c87 ^
547a4926 ^
aafa670d ^
547a4926 ^
1e858c87 ^
aafa670d ^















4b482418 ^
547a4926 ^





aafa670d ^
547a4926 ^
4b482418 ^
1e858c87 ^
547a4926 ^


8e6783a4 ^





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133