request: complete idempotent methods

see rfc2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.

Intact idempotent HTTP methods should be:
GET, HEAD, PUT, DELETE, OPTIONS and TRACE
This commit is contained in:
Yazhong Liu 2014-05-03 02:56:08 +08:00
parent 0491dc7532
commit b969ecf223

View file

@ -259,8 +259,8 @@ module.exports = {
*/
get idempotent() {
return 'GET' == this.method
|| 'HEAD' == this.method;
var idempotents = ['GET','HEAD','PUT','DELETE','OPTIONS','TRACE'];
return idempotents.indexOf(this.method) !== -1;
},
/**