code: def request(self, endpoint, method='GET', params=None, version='1.1', json_encoded=False):
          
  
          if endpoint.startswith('http://'):
              raise TwythonError('api.twitter.com is restricted to SSL/TLS traffic.')
  
          # In case they want to pass a full Twitter URL
          # i.e. https://api.twitter.com/1.1/search/tweets.json
          if endpoint.startswith('https://'):
              url = endpoint
          else:
              url = '%s/%s.json' % (self.api_url % version, endpoint)
  
          content = self._request(url, method=method, params=params,
                                  api_call=url, json_encoded=json_encoded)
  
          return content
docs: Return dict of response received from Twitter's API
  
          :param endpoint: (required) Full url or Twitter API endpoint
                           (e.g. search/tweets)
          :type endpoint: string
          :param method: (optional) Method of accessing data, either
                         GET, POST or DELETE. (default GET)
          :type method: string
          :param params: (optional) Dict of parameters (if any) accepted
                         the by Twitter API endpoint you are trying to
                         access (default None)
          :type params: dict or None
          :param version: (optional) Twitter API version to access
                          (default 1.1)
          :type version: string
          :param json_encoded: (optional) Flag to indicate if this method should send data encoded as json
                          (default False)
          :type json_encoded: bool
  
          :rtype: dict