-
Notifications
You must be signed in to change notification settings - Fork 0
/
http.odin
43 lines (36 loc) · 1.52 KB
/
http.odin
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
package http
// Import necessary types and functions from parsers package
import parsers "./pkg/parsers"
// Re-export types from parsers package
Response :: parsers.Response
Request :: parsers.Request
Status :: parsers.Status
ContentType :: parsers.ContentType
ContentTypeMain :: parsers.ContentTypeMain
HTTPMethod :: parsers.Method
Encoding :: parsers.Encoding
// Import necessary types and functions from core package
import core "./pkg/core"
// Re-export types and functions from core package
HTTPError :: core.Error
write_response :: core.write_response
HTTPOptions :: core.Options
listen_http :: core.connect
ConnectionEvent :: core.ConnectionEvent
EventListener :: core.Listener
// Re-export status functions from parsers package
status_200_OK :: parsers.status_200_OK
status_201_Created :: parsers.status_201_Created
status_400_BadRequest :: parsers.status_400_BadRequest
status_401_Unauthorized :: parsers.status_401_Unauthorized
status_403_Forbidden :: parsers.status_403_Forbidden
status_404_NotFound :: parsers.status_404_NotFound
status_500_InternalServerError :: parsers.status_500_InternalServerError
status_502_BadGateway :: parsers.status_502_BadGateway
status_503_ServiceUnavailable :: parsers.status_503_ServiceUnavailable
// Re-export connection-event methods
dispatch_event :: core.dispatch_event
add_event_listener :: core.add_event_listeners
register_error :: core.register_error
default_connection_event :: core.default_connection_event
interrupt_connection :: core.interrupt_connection