* Return JSON representation. * * Here we explicitly invoke .toJSON() on each * object, as iteration will otherwise fail due * to the getters and cause utilities such as * clone() to fail. * * @return {Object} * @api public
()
| 45 | */ |
| 46 | |
| 47 | toJSON () { |
| 48 | return { |
| 49 | request: this.request.toJSON(), |
| 50 | response: this.response.toJSON(), |
| 51 | app: this.app.toJSON(), |
| 52 | originalUrl: this.originalUrl, |
| 53 | req: class="st">'<original node req>', |
| 54 | res: class="st">'<original node res>', |
| 55 | socket: class="st">'<original node socket>' |
| 56 | } |
| 57 | }, |
| 58 | |
| 59 | /** |
| 60 | * Similar to .throw(), adds assertion. |