def compact(**kwargs):
    """Trigger a compaction operation.

    http://docs.couchdb.org/en/stable/api/database/compact.html#post--db-_compact

    :param kwargs: (optional) Arguments that :meth:`requests.Session.request` takes.
    :rtype: (str, str, dict)
    """
    if 'headers' not in kwargs or not isinstance(kwargs['headers'], dict):
        kwargs['headers'] = {}
    kwargs['headers']['Content-Type'] = 'application/json'
    return 'POST', '_compact', kwargs
