def extract_args_for_httpie_main(context, method=None):
 args = _extract_httpie_options(context)
 if method:
  args.append(method.upper())
 args.append(context.url)
 args += _extract_httpie_request_items(context)
 return args

def extract_args_for_httpie_main ( context , method = None ) : args = _extract_httpie_options ( context ) if method : args . append ( method . upper ( ) ) args . append ( context . url ) args += _extract_httpie_request_items ( context ) return args
transform a context object to a list of arguments that can be passed to httpie main function .