MCPcopy Create free account
hub / github.com/aptly-dev/aptly / post

Method post

system/api_lib.py:70–76  ·  view source on GitHub ↗
(self, uri, *args, **kwargs)

Source from the content-addressed store, hash-verified

68 return requests.get("http://%s%s" % (self.base_url, uri), *args, **kwargs)
69
70 def post(self, uri, *args, **kwargs):
71 if "json" in kwargs:
72 kwargs["data"] = json.dumps(kwargs.pop("json"))
73 if "headers" not in kwargs:
74 kwargs["headers"] = {}
75 kwargs["headers"]["Content-Type"] = "application/json"
76 return requests.post("http://%s%s" % (self.base_url, uri), *args, **kwargs)
77
78 def _ensure_async(self, kwargs):
79 # Make sure we run this as an async task

Callers 2

post_taskMethod · 0.95
uploadMethod · 0.95

Calls 1

postMethod · 0.65

Tested by

no test coverage detected