File tree 1 file changed +35
-1
lines changed
1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change 1
1
# A SURF (Standard Unique Resource Finder) parser
2
2
3
- Features
3
+ ## Features
4
+
4
5
- Transforming a SURF into a structured representation
5
6
- Resolving the domain name of the SURF host into an ip address
6
7
8
+ ## Structure
9
+
10
+ ```
11
+ grid!domain.com -> {
12
+ host: "grid.domain.com" # Notice that `www` is not the default
13
+ path: None,
14
+ port: 2023, # idk, we need to choose a default port
15
+ query: None,
16
+ fragment: None
17
+ }
18
+ ```
19
+
20
+ ```
21
+ grid!domain.com/path/to/something?param=sth#this-section -> {
22
+ host: "grid.domain.com",
23
+ path: ["path", "to", "something"],
24
+ port: 2023, # idk, we need to choose a default port
25
+ query: {
26
+ param: "sth"
27
+ },
28
+ fragment: "the-section"
29
+ }
30
+ ```
31
+
32
+ ```
33
+ grid! -> {
34
+ host: "localhost",
35
+ path: None,
36
+ port: 2023,
37
+ query: None,
38
+ fragment: None
39
+ }
40
+ ```
You can’t perform that action at this time.
0 commit comments