code: def request(method, url, **kwargs):
      
      _set_content_type(kwargs)
      if _content_type_is_json(kwargs) and kwargs.get('data') is not None:
          kwargs['data'] = dumps(kwargs['data'])
      _log_request(method, url, kwargs)
      response = requests.request(method, url, **kwargs)
      _log_response(response)
      return response
docs: A wrapper for ``requests.request``.