MCPcopy
hub / github.com/aio-libs/aiohttp / append_json

Method append_json

aiohttp/multipart.py:915–920  ·  view source on GitHub ↗

Helper to append JSON part.

(self, obj, headers=None)

Source from the content-addressed store, hash-verified

913 return self.parts[-1]
914
915 def append_json(self, obj, headers=None):
916 """Helper to append JSON part."""
917 if not headers:
918 headers = CIMultiDict()
919 headers[CONTENT_TYPE] = 'application/json'
920 return self.append(obj, headers)
921
922 def append_form(self, obj, headers=None):
923 """Helper to append form urlencoded part."""

Callers 5

test_append_jsonMethod · 0.80
test_withMethod · 0.80
test_POST_MULTIPARTMethod · 0.80

Calls 1

appendMethod · 0.95

Tested by 5

test_append_jsonMethod · 0.64
test_withMethod · 0.64
test_POST_MULTIPARTMethod · 0.64