From 420a6154bcdcd7cc676f65de557869543faabdd0 Mon Sep 17 00:00:00 2001 From: pana Date: Fri, 17 Jan 2014 16:30:35 +0800 Subject: [PATCH] update document --- docs/api/request.md | 16 ++++++++++++++++ docs/api/response.md | 20 +++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/docs/api/request.md b/docs/api/request.md index a4ba03a..0886354 100644 --- a/docs/api/request.md +++ b/docs/api/request.md @@ -307,3 +307,19 @@ this.acceptsLanguages(); // => ["es", "pt", "en"] ``` +### req.idempotent + + Check if the request is idempotent. + +### req.socket + + Return the request socket. + +### req.vary(field) + + Vary on `field`. + +### req.get(field) + + Return request header. + diff --git a/docs/api/response.md b/docs/api/response.md index 740caac..399d187 100644 --- a/docs/api/response.md +++ b/docs/api/response.md @@ -8,12 +8,20 @@ ### res.header - Response header object. + Response header object. + +### res.socket + + Request socket. ### res.status Get response status. By default, `res.status` is not set unlike node's `res.statusCode` which defaults to `200`. +### res.statusString + + Response status string + ### res.status= Set response status via numeric code or case-insensitive string: @@ -243,3 +251,13 @@ this.response.lastModified = new Date(); ```js this.response.etag = crypto.createHash('md5').update(this.body).digest('hex'); ``` + +### res.append(field, val) + + Append `val` to header `field`. + +### res.vary(field) + + Vary on `field`. + +