MCPcopy Create free account
hub / github.com/authlib/authlib / BaseApp

Class BaseApp

authlib/integrations/base_client/sync_app.py:15–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14
15class BaseApp:
16 client_cls = None
17 OAUTH_APP_CONFIG = None
18
19 def request(self, method, url, token=None, **kwargs):
20 raise NotImplementedError()
21
22 def get(self, url, **kwargs):
23 """Invoke GET http request.
24
25 If ``api_base_url`` configured, shortcut is available::
26
27 client.get("users/lepture")
28 """
29 return self.request("GET", url, **kwargs)
30
31 def post(self, url, **kwargs):
32 """Invoke POST http request.
33
34 If ``api_base_url`` configured, shortcut is available::
35
36 client.post("timeline", json={"text": "Hi"})
37 """
38 return self.request("POST", url, **kwargs)
39
40 def patch(self, url, **kwargs):
41 """Invoke PATCH http request.
42
43 If ``api_base_url`` configured, shortcut is available::
44
45 client.patch("profile", json={"name": "Hsiaoming Yang"})
46 """
47 return self.request("PATCH", url, **kwargs)
48
49 def put(self, url, **kwargs):
50 """Invoke PUT http request.
51
52 If ``api_base_url`` configured, shortcut is available::
53
54 client.put("profile", json={"name": "Hsiaoming Yang"})
55 """
56 return self.request("PUT", url, **kwargs)
57
58 def delete(self, url, **kwargs):
59 """Invoke DELETE http request.
60
61 If ``api_base_url`` configured, shortcut is available::
62
63 client.delete("posts/123")
64 """
65 return self.request("DELETE", url, **kwargs)
66
67
68class _RequestMixin:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected