code: function insertDoc (doc, qs0, callback0) {
        const req = { db: dbName, body: doc, method: 'POST' }
  
        let { opts, callback } = getCallback(qs0, callback0)
  
        if (typeof opts === 'string') {
          opts = { docName: opts }
        }
  
        if (opts) {
          if (opts.docName) {
            req.doc = opts.docName
            req.method = 'PUT'
            delete opts.docName
          }
          req.qs = opts
        }
  
        return relax(req, callback)
      }
docs: http://docs.couchdb.org/en/latest/api/document/common.html#put--db-docid http://docs.couchdb.org/en/latest/api/database/common.html#post--db