code: 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'
docs: Format a Context object to an HTTPie command.