Commit 3263669
committed
feat: Add URI struct support for URL handling
- HTTP.fetch/2 now accepts both String.t() and URI.t() types
- All internal representations use %URI{} instead of strings for better type safety
- HTTP.Request and HTTP.Response structs updated to use URI.t() for URL fields
- Automatic conversion from string to URI for backward compatibility
- Updated streaming functions to work with URI structs
- Enhanced documentation in README with URI usage examples
- Updated CHANGELOG with detailed refactoring notes
- All tests updated and passing
Maintains full backward compatibility while providing enhanced type safety
and flexibility for URL handling.1 parent a1603c0 commit 3263669
File tree
6 files changed
+57
-40
lines changed- lib
- http
- test/http
6 files changed
+57
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
10 | 28 | | |
11 | 29 | | |
12 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
70 | 81 | | |
71 | 82 | | |
72 | 83 | | |
| |||
93 | 104 | | |
94 | 105 | | |
95 | 106 | | |
96 | | - | |
| 107 | + | |
97 | 108 | | |
98 | 109 | | |
99 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 166 | + | |
| 167 | + | |
183 | 168 | | |
184 | 169 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
190 | 175 | | |
191 | | - | |
| 176 | + | |
192 | 177 | | |
193 | | - | |
| 178 | + | |
194 | 179 | | |
195 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
196 | 184 | | |
197 | 185 | | |
198 | 186 | | |
| |||
266 | 254 | | |
267 | 255 | | |
268 | 256 | | |
269 | | - | |
| 257 | + | |
270 | 258 | | |
271 | 259 | | |
272 | 260 | | |
| |||
326 | 314 | | |
327 | 315 | | |
328 | 316 | | |
329 | | - | |
| 317 | + | |
330 | 318 | | |
331 | 319 | | |
332 | | - | |
| 320 | + | |
333 | 321 | | |
334 | 322 | | |
335 | 323 | | |
336 | 324 | | |
337 | 325 | | |
338 | | - | |
339 | | - | |
340 | | - | |
| 326 | + | |
| 327 | + | |
341 | 328 | | |
342 | 329 | | |
343 | 330 | | |
| |||
350 | 337 | | |
351 | 338 | | |
352 | 339 | | |
353 | | - | |
| 340 | + | |
354 | 341 | | |
355 | 342 | | |
356 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
0 commit comments