diff options
| author | Shulhan <ms@kilabit.info> | 2021-09-25 23:50:28 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-09-26 01:05:32 +0700 |
| commit | 2d3e5d9f2bb36135472732f591ac0843cbe70e09 (patch) | |
| tree | 1a9cb5a7a3fbc6a6beea599870428188b4a82ec9 /example | |
| parent | 8800b8fb860f6d8429487bf6bb45dc9cca29507a (diff) | |
| download | gorankusu-2d3e5d9f2bb36135472732f591ac0843cbe70e09.tar.xz | |
all: unembed HTTP server on Trunks
Since we will implement API using WebSocket later, we need to split
between the one that manage HTTP and one that manage WebSocket.
Diffstat (limited to 'example')
| -rw-r--r-- | example/example.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/example/example.go b/example/example.go index 3d582eb..bc6d9f6 100644 --- a/example/example.go +++ b/example/example.go @@ -112,7 +112,7 @@ func (ex *Example) Stop() { // registerEndpoints register HTTP endpoints for testing. // func (ex *Example) registerEndpoints() (err error) { - err = ex.trunks.Server.RegisterEndpoint(&libhttp.Endpoint{ + err = ex.trunks.Httpd.RegisterEndpoint(&libhttp.Endpoint{ Method: libhttp.RequestMethodGet, Path: pathExample, RequestType: libhttp.RequestTypeQuery, @@ -123,7 +123,7 @@ func (ex *Example) registerEndpoints() (err error) { return err } - err = ex.trunks.Server.RegisterEndpoint(&libhttp.Endpoint{ + err = ex.trunks.Httpd.RegisterEndpoint(&libhttp.Endpoint{ Method: libhttp.RequestMethodGet, Path: pathExampleError, RequestType: libhttp.RequestTypeQuery, @@ -134,7 +134,7 @@ func (ex *Example) registerEndpoints() (err error) { return err } - err = ex.trunks.Server.RegisterEndpoint(&libhttp.Endpoint{ + err = ex.trunks.Httpd.RegisterEndpoint(&libhttp.Endpoint{ Method: libhttp.RequestMethodPost, Path: pathExample, RequestType: libhttp.RequestTypeForm, |
