Skip to content

Commit

Permalink
Add https server document
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <[email protected]>
  • Loading branch information
ganmacs committed Jan 27, 2020
1 parent 9c42a92 commit 18f2959
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions developer/api-plugin-helper-http_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,32 @@ in plugin's `stop` method. The plugin stops launched http server automatically.

### create\_http\_server(title, addr:, port:, logger:, default\_app: nil, &block)

__this method is deprecated. Use http\_server\_create\_http\_server method instead__

### http\_server\_create\_http\_server(title, addr:, port:, logger:, default\_app: nil, proto: nil, &block)

This method creats and runs http server with given routes which are defined in `&block`.

- `title`: the name of listen thread. this name must be unique
- `addr`: Adderess to listen to
- `port`: Port to listen to.
- `logger`: Logger which is used in server helper
- `default_app`: Use this object when server received a request whose path is not registered. This object must have `#call` or be a `Proc` object.
- `proto`: protocol type. `:tcp`, `:tls`. default value is tcp
- `tls_opts`: options for TLS. same as the [Server Helper's server_create_connection tls_options](/developer/api-plugin-helper-server)

### http\_server\_create\_https\_server(title, addr:, port:, logger:, default\_app: nil, &block)

This method creats and runs http server with given routes which are defined in `&block`.

- `title`: the name of listen thread. this name must be unique
- `addr`: Adderess to listen to
- `port`: Port to listen to
- `logger`: Logger which is used in server helper
- `default_app`: Use this object when server received a request whose path is not registered. This object must have `#call` or be a `Proc` object.
- `proto`: protocol type. `:tcp`, `:tls`
- `tls_opts`: options for TLS. same as the [Server Helper's server_create_connection tls_options](/developer/api-plugin-helper-server)


## Define other HTTP methods

Expand Down

0 comments on commit 18f2959

Please sign in to comment.