@@ -19,7 +19,7 @@ module [
1919# FOR ROC
2020
2121# https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
22- Method : [Options , Get , Post , Put , Delete , Head , Trace , Connect , Patch , Extension Str ]
22+ Method : [OPTIONS , GET , POST , PUT , DELETE , HEAD , TRACE , CONNECT , PATCH , EXTENSION Str ]
2323
2424# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
2525Header : { name : Str , value : Str }
@@ -75,21 +75,21 @@ to_host_request = \{ method, headers, uri, body, timeout_ms } -> {
7575to_host_method : Method -> _
7676to_host_method = \method ->
7777 when method is
78- Options -> 5
79- Get -> 3
80- Post -> 7
81- Put -> 8
82- Delete -> 1
83- Head -> 4
84- Trace -> 9
85- Connect -> 0
86- Patch -> 6
87- Extension (_ ) -> 2
78+ OPTIONS -> 5
79+ GET -> 3
80+ POST -> 7
81+ PUT -> 8
82+ DELETE -> 1
83+ HEAD -> 4
84+ TRACE -> 9
85+ CONNECT -> 0
86+ PATCH -> 6
87+ EXTENSION (_ ) -> 2
8888
8989to_host_method_ext : Method -> Str
9090to_host_method_ext = \method ->
9191 when method is
92- Extension (ext) -> ext
92+ EXTENSION (ext) -> ext
9393 _ -> " "
9494
9595to_host_timeout : _ -> U64
@@ -110,16 +110,16 @@ from_host_request = \{ method, method_ext, headers, uri, body, timeout_ms } -> {
110110from_host_method : U64 , Str -> Method
111111from_host_method = \tag, ext ->
112112 when tag is
113- 5 -> Options
114- 3 -> Get
115- 7 -> Post
116- 8 -> Put
117- 1 -> Delete
118- 4 -> Head
119- 9 -> Trace
120- 0 -> Connect
121- 6 -> Patch
122- 2 -> Extension (ext)
113+ 5 -> OPTIONS
114+ 3 -> GET
115+ 7 -> POST
116+ 8 -> PUT
117+ 1 -> DELETE
118+ 4 -> HEAD
119+ 9 -> TRACE
120+ 0 -> CONNECT
121+ 6 -> PATCH
122+ 2 -> EXTENSION (ext)
123123 _ -> crash(" invalid tag from host" )
124124
125125from_host_timeout : U64 -> [TimeoutMilliseconds U64 , NoTimeout ]
0 commit comments