def _make_request(token, method_name, method='get', params=None, files=None, base_url=API_URL):
 request_url = base_url.format(token, method_name)
 logger.debug('Request: method={0} url={1} params={2} files={3}'.format(method, request_url, params, files))
 read_timeout = READ_TIMEOUT
 connect_timeout = CONNECT_TIMEOUT
 if params:
  if ('timeout' in params):
   read_timeout = (params['timeout'] + 10)
  if ('connect-timeout' in params):
   connect_timeout = (params['connect-timeout'] + 10)
 result = req_session.request(method, request_url, params=params, files=files, timeout=(connect_timeout, read_timeout))
 logger.debug("The server returned: '{0}'".format(result.text.encode('utf8')))
 return _check_result(method_name, result)['result']

def _make_request ( token , method_name , method = 'get' , params = None , files = None , base_url = API_URL ) : request_url = base_url . format ( token , method_name ) logger . debug ( 'Request: method={0} url={1} params={2} files={3}' . format ( method , request_url , params , files ) ) read_timeout = READ_TIMEOUT connect_timeout = CONNECT_TIMEOUT if params : if ( 'timeout' in params ) : read_timeout = ( params [ 'timeout' ] + 10 ) if ( 'connect-timeout' in params ) : connect_timeout = ( params [ 'connect-timeout' ] + 10 ) result = req_session . request ( method , request_url , params = params , files = files , timeout = ( connect_timeout , read_timeout ) ) logger . debug ( "The server returned: '{0}'" . format ( result . text . encode ( 'utf8' ) ) ) return _check_result ( method_name , result ) [ 'result' ]
return a :meth:pyramid .