13 марта 2026 · POST /actions/test-http-request · dev-api.chatplace.io
Прямые вызовы POST /actions/test-http-request через API (без фронтенда). Авторизация: X-Auth-Token (JWT). Целевой URL: https://httpbin.org/anything (эхо-сервис).
Цель Проверить что бэкенд корректно обрабатывает все методы, headers и body.
| Тест | Запрос | Результат | Вердикт |
|---|---|---|---|
| GET | {"url":"…?foo=bar", "method":"GET"} |
200 OK, args: {foo: bar} | ✅ PASS |
| POST + body | {"method":"POST", "json":"{\"name\":\"test\",\"value\":123}"} |
200 OK, data: {"name":"test","value":123}, Content-Type: application/json, Content-Length: 27 | ✅ PASS |
| PUT + body | {"method":"PUT", "json":"{\"name\":\"test\",\"value\":123}"} |
200 OK, data: {"name":"test","value":123}, Content-Type: application/json, Content-Length: 27 | ✅ PASS |
| DELETE | {"method":"DELETE"} |
200 OK, method: DELETE | ✅ PASS |
| GET + headers | {"method":"GET", "headers":[{"key":"X-Test","value":"hello"},{"key":"X-Custom","value":"world"}]} |
200 OK, X-Test: hello, X-Custom: world | ✅ PASS |
| POST + headers + body | {"method":"POST", "headers":[{"key":"X-Test","value":"hello"}], "json":"{\"data\":\"test\"}"} |
200 OK, X-Test: hello, data: {"data":"test"} | ✅ PASS |
→ {"url":"https://httpbin.org/anything?foo=bar","method":"GET"}
← 200 OK
args: {"foo": "bar"}
method: "GET"
→ {"url":"https://httpbin.org/anything","method":"POST","json":"{\"name\":\"test\",\"value\":123}"}
← 200 OK
data: "{\"name\":\"test\",\"value\":123}"
json: {"name": "test", "value": 123}
Content-Type: application/json
Content-Length: 27
→ {"url":"https://httpbin.org/anything","method":"GET","headers":[{"key":"X-Test","value":"hello"},{"key":"X-Custom","value":"world"}]}
← 200 OK
X-Test: hello
X-Custom: world
[{key, value}] и body в поле json для всех методов.