def _assemble_headers(self, method, user_headers=None):
        """
        Takes the supplied headers and adds in any which
        are defined at a client level and then returns
        the result.

        :param user_headers: a `dict` containing headers defined at the
                             request level, optional.

        :return: a `dict` instance
        """

        headers = copy.deepcopy(user_headers or {})

        if method not in ('GET', 'HEAD'):
            headers.setdefault('Content-Type', 'application/json')

        return headers
def _assemble_headers ( self , method , user_headers = None ) : headers = copy . deepcopy ( user_headers or { } ) if method not in ( 'GET' , 'HEAD' ) : headers . setdefault ( 'Content-Type' , 'application/json' ) return headers
Takes the supplied headers and adds in any which
        are defined at a client level and then returns
        the result.

        :param user_headers: a `dict` containing headers defined at the
                             request level, optional.

        :return: a `dict` instance