/
maybeyoou
/
ru
Обзор
Документация
Войти
/
maybeyoou
/
ru
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
tu.html
39 строк
735 B
maybeyoou
Update: tu.html
01 июл 2026, 06:31
Верифицирован
01 июл 2026, 06:31
9f31928
Код
Авторство
О чём код?
<!DOCTYPE html> <html lang="ru"> <head> <meta charset="UTF-8"> <title>302 JSON fetch</title> </head> <body> <button onclick="run()">FETCH</button> <pre id="out"></pre> <script> async function fetchFollow302(url) { const res = await fetch(url, { method: "GET", redirect: "follow" }); const text = await res.text(); try { return JSON.parse(text); } catch (e) { return { error: "not json", raw: text }; } } async function run() { const url = "https://translate.yandex.ru/translate?url=https://wild-cloud-3c35.maybeyoou.workers.dev/data&lang=de-de"; const data = await fetchFollow302(url); document.getElementById("out").textContent = JSON.stringify(data, null, 2); } </script> </body> </html>