Skip to content

Commit bfa89c3

Browse files
committed
Move Request into its own module.
1 parent 2d52685 commit bfa89c3

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

examples/hello.ooc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use web, fastcgi
22

3-
import web/Application
3+
import web/[Application, Request]
44
import fastcgi/Server
55

66

web/Application.ooc

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1+
use web
2+
import web/Request
13
import structs/HashMap
24

3-
Request: class {
4-
init: func {
5-
headers = HashMap<String> new()
6-
}
7-
8-
path: String
9-
method: String
10-
remoteHost: String
11-
remotePort: Int
12-
13-
headers: HashMap<String>
14-
}
15-
165
ResponseWriter: abstract class {
176
write: func(data: String) -> Int { return 0}
187
flush: func {}

web/Request.ooc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import structs/HashMap
2+
3+
Request: class {
4+
init: func {
5+
headers = HashMap<String> new()
6+
}
7+
8+
path: String
9+
method: String
10+
remoteHost: String
11+
remotePort: Int
12+
13+
headers: HashMap<String>
14+
}
15+

0 commit comments

Comments
 (0)