<reponame>codeadict/guajiro<filename>guajiro/core/response_types.py<gh_stars>1-10
import json
import enum

#TODO: Define XML and YAML response

class ResponseType(enum.Enum):

    TEXT = {
        "headers": {
            "Content-Type": "text/plain",
        },
    }

    HTML = {
        "headers": {
            "Content-Type": "text/html",
        }
    }

    JSON = {
        "handler": json.dumps,
        "headers": {
            "Content-Type": "application/json"
        },
    }
import json
import enum

#TODO: Define XML and YAML response

class ResponseType(enum.Enum):

    TEXT = {
        "headers": {
            "Content-Type": "text/plain",
        },
    }

    HTML = {
        "headers": {
            "Content-Type": "text/html",
        }
    }

    JSON = {
        "handler": json.dumps,
        "headers": {
            "Content-Type": "application/json"
        },
    }
#TODO: Define XML and YAML response