# Path: via/get_url.py
# def get_url_details(http_service, url, headers=None):


import json
from collections import OrderedDict
from pyramid import view
from pyramid.response import Response
from via.get_url import clean_headers
"""Views for debugging."""





@view.view_config(route_name="debug_headers")
def debug_headers(_context, request):
    """Dump the headers as we receive them for debugging."""

    if request.GET.get("raw"):
        headers = OrderedDict(request.headers)
    else:

# Path: via/get_url.py
# def get_url_details(http_service, url, headers=None):


# Path: via/views/debug.py
import json
from collections import OrderedDict
from pyramid import view
from pyramid.response import Response
from via.get_url import clean_headers

"""Views for debugging."""





@view.view_config(route_name="debug_headers")
def debug_headers(_context, request):
    """Dump the headers as we receive them for debugging."""

    if request.GET.get("raw"):
        headers = OrderedDict(request.headers)
    else:

        headers = clean_headers(request.headers)