Skip to content

Commit

Permalink
Merge pull request #120 from tarantool/update_doc
Browse files Browse the repository at this point in the history
Update README
  • Loading branch information
Satbek committed May 26, 2020
2 parents 3ee593d + 9c5882f commit adf1a90
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ server = require('http.server').new(host, port[, { options } ])
`options` may contain:
* `handler` - a Lua function to handle HTTP requests (this is
a handler to use if the module "routing" functionality is not
needed).
* `display_errors` - return application errors and backtraces to the client
(like PHP).
* `log_requests` - log incoming requests. This parameter can receive:
Expand Down Expand Up @@ -213,7 +210,9 @@ end
| `req:redirect_to` | create a **Response** object with an HTTP redirect.
| `req:next()` | in middleware invokes remaining middleware chain and route handler and returns the response |
| `req:hijack()` | terminates HTTP connection. Open TCP connection object is returned |
| `req:json()` | returns a Lua table from a JSON request. |
| `req:json()` | returns a Lua table from a JSON request. |
| `req:render(opts)` | create a **Response** in the defined data format or with a rendered template. **opts** is a table with one key, where key is the response body format, and value is the response body data. **opts** example: `{json = {field1 = 'value1', field2 = 'value2'}}`. If **opts** is not defined, the method creates a **Response** with a rendered template. |
### Fields and methods of the Response object
Expand Down

0 comments on commit adf1a90

Please sign in to comment.