from typing import MutableMapping
import json


def _dump_headers(headers: MutableMapping[str, str]) -> str:
    """Dump http headers as json format string for logging.

    Arguments:
        headers: Headers of http request or response.

    Returns:
        Json format string of headers content.

    """
    return json.dumps(dict(headers), indent=2)