# Path: zorro/util.py
# class cached_property(object):
# 
#     def __init__(self, fun):
#         self.function = fun
#         self.name = fun.__name__
# 
#     def __get__(self, obj, cls):
#         if obj is None:
#             return self
#         res = obj.__dict__[self.name] = self.function(obj)
#         return res
# 
# class marker_object(object):
#     __slots__ = ('name',)
# 
#     def __init__(self, name):
#         self.name = name
# 
#     def __repr__(self):
#         return '<{}>'.format(self.name)


import abc
import json
import logging
import inspect
from http.cookies import SimpleCookie
from urllib.parse import urlparse, parse_qsl
from itertools import zip_longest
from functools import partial
from .util import cached_property, marker_object
    def update(self, pairs):
        for k, v in pairs:
            if k not in self._dic:
                self._dic[k] = [v]
            else:
                self._dic[k].append(v)

    def getlist(self, k):
        return list(self._dic[k])

    def __contains__(self, k):
        return k in self._dic

    def __iter__(self):
        for k in self._dic:
            yield k

    def __len__(self):
        return len(self._dic)


class Request(object):
    __slots__ = ('__dict__',
        # the excpected property names and names of respective zerogw items
        'uri',           # !Uri
        'content_type',  # !Header Content-Type
        'cookie',        # !Header Cookie
        'body',          # !PostBody
        )


# Path: zorro/util.py
# class cached_property(object):
# 
#     def __init__(self, fun):
#         self.function = fun
#         self.name = fun.__name__
# 
#     def __get__(self, obj, cls):
#         if obj is None:
#             return self
#         res = obj.__dict__[self.name] = self.function(obj)
#         return res
# 
# class marker_object(object):
#     __slots__ = ('name',)
# 
#     def __init__(self, name):
#         self.name = name
# 
#     def __repr__(self):
#         return '<{}>'.format(self.name)


# Path: zorro/web.py
import abc
import json
import logging
import inspect
from http.cookies import SimpleCookie
from urllib.parse import urlparse, parse_qsl
from itertools import zip_longest
from functools import partial
from .util import cached_property, marker_object

    def update(self, pairs):
        for k, v in pairs:
            if k not in self._dic:
                self._dic[k] = [v]
            else:
                self._dic[k].append(v)

    def getlist(self, k):
        return list(self._dic[k])

    def __contains__(self, k):
        return k in self._dic

    def __iter__(self):
        for k in self._dic:
            yield k

    def __len__(self):
        return len(self._dic)


class Request(object):
    __slots__ = ('__dict__',
        # the excpected property names and names of respective zerogw items
        'uri',           # !Uri
        'content_type',  # !Header Content-Type
        'cookie',        # !Header Cookie
        'body',          # !PostBody
        )


    @cached_property