MCPcopy
hub / github.com/AstrBotDevs/AstrBot / _get_current

Method _get_current

astrbot/api/web.py:257–264  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

255 """Typed proxy for the request bound to the current plugin Web handler."""
256
257 def _get_current(self) -> PluginRequest:
258 try:
259 return _request_var.get()
260 except LookupError as exc:
261 raise RuntimeError(
262 "astrbot.api.web.request is only available inside a plugin Web API "
263 "handler."
264 ) from exc
265
266 @property
267 def method(self) -> str:

Callers 15

methodMethod · 0.95
pathMethod · 0.95
headersMethod · 0.95
cookiesMethod · 0.95
content_typeMethod · 0.95
client_hostMethod · 0.95
path_paramsMethod · 0.95
plugin_nameMethod · 0.95
usernameMethod · 0.95
queryMethod · 0.95
bodyMethod · 0.95
jsonMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected