def format_to_httpie(context, method=None):
 cmd = (['http'] + _extract_httpie_options(context, quote=True, join_key_value=True))
 if method:
  cmd.append(method.upper())
 cmd.append(context.url)
 cmd += _extract_httpie_request_items(context, quote=True)
 return (' '.join(cmd) + '\n')

def format_to_httpie ( context , method = None ) : cmd = ( [ 'http' ] + _extract_httpie_options ( context , quote = True , join_key_value = True ) ) if method : cmd . append ( method . upper ( ) ) cmd . append ( context . url ) cmd += _extract_httpie_request_items ( context , quote = True ) return ( ' ' . join ( cmd ) + '\n' )
format a context object to an httpie command .