MCPcopy
hub / github.com/httpie/cli / save

Method save

httpie/config.py:110–128  ·  view source on GitHub ↗
(self, *, bump_version: bool = False)

Source from the content-addressed store, hash-verified

108 self.update(data)
109
110 def save(self, *, bump_version: bool = False):
111 self.setdefault('__meta__', {})
112 if bump_version or 'httpie' not in self['__meta__']:
113 self['__meta__']['httpie'] = __version__
114 if self.helpurl:
115 self['__meta__']['help'] = self.helpurl
116
117 if self.about:
118 self['__meta__']['about'] = self.about
119
120 self.ensure_directory()
121
122 json_string = json.dumps(
123 obj=self.post_process_data(self),
124 indent=4,
125 sort_keys=True,
126 ensure_ascii=True,
127 )
128 self.path.write_text(json_string + '\n', encoding=UTF8)
129
130 @property
131 def version(self):

Calls 2

ensure_directoryMethod · 0.95
post_process_dataMethod · 0.95