console: fix help wording and python example

This commit is contained in:
Naeel
2026-04-27 11:36:37 +03:00
parent 15779ffccc
commit 326af72684
+15 -1
View File
@@ -615,7 +615,7 @@
</div>
<div class="help-section">
<h4>Как вызвать функцию вне морды</h4>
<h4>Как вызвать функцию вне веб-интерфейса</h4>
<div class="help-list">
<div>Обычный пользователь вызывает функцию через HTTP gateway console: <span class="mono">/fn/...</span>.</div>
<div>Используется только ваш токен из личного кабинета в заголовке <span class="mono">Authorization: Bearer &lt;token&gt;</span>.</div>
@@ -629,6 +629,20 @@
<div class="help-code">export TOKEN="&lt;ваш пользовательский токен&gt;"
curl -sk https://fission.kube5s.ru/fn/ВАШ_ROUTE \
-H "Authorization: Bearer $TOKEN"</div>
<div class="help-code">import requests
token = "ВАШ_ТОКЕН"
url = "https://fission.kube5s.ru/fn/ВАШ_ROUTE"
response = requests.post(
url,
headers={"Authorization": f"Bearer {token}"},
json={"x": 1, "y": 2},
timeout=60,
)
print(response.status_code)
print(response.text)</div>
</div>
<div class="help-section">