Type Definitions
handler
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
method |
string |
<optional> |
The method to be listening for, ex. `'HEAD'`. Will default to all request methods. |
path |
string | RegExp | The path to be listening for ex. `/\/docs\/.+/` |
handlerCallback(request, response, nextopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
request |
Request | The request sent by the client. See https://nodejs.org/dist/latest-v6.x/docs/api/http.html#http_class_http_clientrequest. | |
response |
Response | The response to be sent by the server. See https://nodejs.org/dist/latest-v6.x/docs/api/http.html#http_class_http_serverresponse. | |
next |
function |
<optional> |
Call after this plugin has finished loading. |