MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / request

Method request

astrbot/dashboard/asgi_runtime.py:331–343  ·  view source on GitHub ↗
(self, method: str, url: str, **kwargs)

Source from the content-addressed store, hash-verified

329 return normalized_files
330
331 async def request(self, method: str, url: str, **kwargs):
332 data = kwargs.pop("data", None)
333 if data is not None and "files" not in kwargs:
334 normalized_data, files = self._normalize_data(data)
335 kwargs["data"] = normalized_data
336 if files:
337 kwargs["files"] = files
338 elif data is not None:
339 kwargs["data"] = data
340 if "files" in kwargs:
341 kwargs["files"] = self._normalize_files(kwargs["files"])
342 response = await self._client.request(method, url, **kwargs)
343 return AdapterTestResponse(response)
344
345 async def get(self, url: str, **kwargs):
346 return await self.request("GET", url, **kwargs)

Callers 6

getMethod · 0.95
postMethod · 0.95
putMethod · 0.95
patchMethod · 0.95
deleteMethod · 0.95

Calls 4

_normalize_dataMethod · 0.95
_normalize_filesMethod · 0.95
AdapterTestResponseClass · 0.85
popMethod · 0.80