"use strict";

var utils = require('../utils');

module.exports = function (app) {
  utils.requires(app, 'routes/db');

  // Query a document view
  app.get('/:db/_design/:id/_view/:view', function (req, res, next) {
    var query = req.params.id + '/' + req.params.view;
    var opts = utils.makeOpts(req, req.query);
    req.db.query(query, opts, utils.sendCallback(res));
  });
};

@@ -39,16 +39,48 @@
 /utils')
+,%0A    extend = require('extend')
 ;%0A%0Amodul
@@ -149,44 +149,17 @@
 );%0A%0A
-  // Query a document view%0A
   app.
-get
+all
 ('/:
@@ -215,16 +215,384 @@
 next) %7B%0A
+    if (req.method !== 'GET' && req.method !== 'POST') %7B%0A      return next();%0A    %7D%0A%0A    // Check that the request body, if present, is an object.%0A    if (req.body && (typeof req.body !== 'object' %7C%7C Array.isArray(req.body))) %7B%0A      return utils.sendJSON(res, 400, %7B%0A        reason: %22Request body must be a JSON object%22,%0A        error: 'bad_request'%0A      %7D);%0A    %7D%0A%0A
     var 
@@ -672,16 +672,37 @@
 pts(req,
+ extend(%7B%7D, req.body,
  req.que
@@ -704,16 +704,17 @@
 q.query)
+)
 ;%0A    re

Add post handler to views route