def get_response(args, config_dir):
 ssl_version = None
 if args.ssl_version:
  ssl_version = SSL_VERSION_ARG_MAPPING[args.ssl_version]
 requests_session = get_requests_session(ssl_version)
 requests_session.max_redirects = args.max_redirects
 if ((not args.session) and (not args.session_read_only)):
  kwargs = get_requests_kwargs(args)
  if args.debug:
   dump_request(kwargs)
  response = requests_session.request(**kwargs)
 else:
  response = sessions.get_response(requests_session=requests_session, args=args, config_dir=config_dir, session_name=(args.session or args.session_read_only), read_only=bool(args.session_read_only))
 return response

def get_response ( args , config_dir ) : ssl_version = None if args . ssl_version : ssl_version = SSL_VERSION_ARG_MAPPING [ args . ssl_version ] requests_session = get_requests_session ( ssl_version ) requests_session . max_redirects = args . max_redirects if ( ( not args . session ) and ( not args . session_read_only ) ) : kwargs = get_requests_kwargs ( args ) if args . debug : dump_request ( kwargs ) response = requests_session . request ( ** kwargs ) else : response = sessions . get_response ( requests_session = requests_session , args = args , config_dir = config_dir , session_name = ( args . session or args . session_read_only ) , read_only = bool ( args . session_read_only ) ) return response
read a serialized response message from a socket .