--------------------General--------------------<br>
Request URL: http://ly02.3idorz.com:80/sitemap.xml<br>
Request Method: GET<br>
Status Code: 000<br>
Remote Address: 128.14.27.148<br>
HTTP Version: 1.1<br>
--------------------Request Headers--------------------<br>
cdn-loop:hanstech<br>
host:ly02.3idorz.com<br>
hanstech-cdn-loop:hanstech<br>
x-forwarded-for:216.73.216.5<br>
accept-encoding:gzip, br, zstd, deflate<br>
x-forwarded-proto:https<br>
true-client-ip:216.73.216.5<br>
user-agent:Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)<br>
accept:*/*<br>
--------------------Response Headers--------------------<br>
server:ste<br>
content-type:text/xml; charset=utf-8<br>
connection:keep-alive<br>
transfer-encoding:chunked<br>
<!DOCTYPE html>
<html lang="zh-Hant">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="圖檔及 API 測試範本-固定">
    <title>測試範本</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            line-height: 1.6;
        }
        header {
            background: #333;
            color: white;
            padding: 1rem;
            text-align: center;
        }
        section {
            padding: 2rem;
        }
        img {
            max-width: 100%;
            height: auto;
            display: block;
            margin: 1rem 0;
        }
        button {
            padding: 0.5rem 1rem;
            font-size: 1rem;
            background: #4CAF50;
            color: white;
            border: none;
            cursor: pointer;
        }
        button:hover {
            background: #45a049;
        }
        #api-result, #auto-api-result, #post-api-result, #auto-post-api-result {
            margin-top: 1rem;
            padding: 1rem;
            background: #f4f4f4;
            border: 1px solid #ddd;
        }
    </style>
</head>
<body>
    <header>
        <h1>圖檔及 API 測試範本-固定</h1>
    </header>

    <section id="image-test">
        <h2>圖檔測試區域</h2>
        <p>以下是測試用的圖檔：</p>
        <img src="http://picture.ez168.me/images/pokemon00.png" alt="測試圖檔">
        <p>您可以替換上方的圖檔 URL，或上傳您自己的圖檔以進行測試。</p>
    </section>

    <section id="api-test">
        <h2>GET API 測試區域</h2>
        <p>點擊按鈕以測試 GET API 回應：</p>
        <button id="test-api-button">測試 GET API</button>
        <div id="api-result">GET API 回應將顯示於此處。</div>
    </section>

    <section id="post-api-test">
        <h2>POST API 測試區域</h2>
        <p>點擊按鈕以測試 POST API 回應：</p>
        <button id="test-post-api-button">測試 POST API</button>
        <div id="post-api-result">POST API 回應將顯示於此處。</div>
    </section>

    <section id="auto-api-test">
        <h2>自動執行 GET API 測試區域</h2>
        <p>此區域顯示頁面加載時自動執行的 GET API 回應：</p>
        <div id="auto-api-result">等待 GET API 回應中...</div>
    </section>

    <section id="auto-post-api-test">
        <h2>自動執行 POST API 測試區域</h2>
        <p>此區域顯示頁面加載時自動執行的 POST API 回應：</p>
        <div id="auto-post-api-result">等待 POST API 回應中...</div>
    </section>

    <script>
        // 手動 GET API 測試按鈕功能
        document.getElementById('test-api-button').addEventListener('click', () => {
            const apiEndpoint = 'https://jsonplaceholder.typicode.com/posts/1'; // 替換為您的 GET API URL
            fetch(apiEndpoint)
                .then(response => response.json())
                .then(data => {
                    document.getElementById('api-result').innerText = JSON.stringify(data, null, 2);
                })
                .catch(error => {
                    document.getElementById('api-result').innerText = 'GET API 請求失敗：' + error;
                });
        });

        // 手動 POST API 測試按鈕功能
        document.getElementById('test-post-api-button').addEventListener('click', () => {
            const postApiEndpoint = 'https://jsonplaceholder.typicode.com/posts'; // 替換為您的 POST API URL
            const postData = { title: 'foo', body: 'bar', userId: 1 }; // 您的 POST 請求數據
            fetch(postApiEndpoint, {
                method: 'POST',
                headers: { 'Content-Type': 'application/json' },
                body: JSON.stringify(postData)
            })
                .then(response => response.json())
                .then(data => {
                    document.getElementById('post-api-result').innerText = JSON.stringify(data, null, 2);
                })
                .catch(error => {
                    document.getElementById('post-api-result').innerText = 'POST API 請求失敗：' + error;
                });
        });

        // 自動執行的 GET API 請求
        window.addEventListener('load', () => {
            const autoApiEndpoint = 'https://jsonplaceholder.typicode.com/posts/2'; // 替換為您的 GET API URL
            fetch(autoApiEndpoint)
                .then(response => response.json())
                .then(data => {
                    document.getElementById('auto-api-result').innerText = JSON.stringify(data, null, 2);
                })
                .catch(error => {
                    document.getElementById('auto-api-result').innerText = 'GET API 請求失敗：' + error;
                });
        });

        // 自動執行的 POST API 請求
        window.addEventListener('load', () => {
            const autoPostApiEndpoint = 'https://jsonplaceholder.typicode.com/posts'; // 替換為您的 POST API URL
            const autoPostData = { title: 'auto', body: 'test', userId: 2 }; // 自動 POST 的數據
            fetch(autoPostApiEndpoint, {
                method: 'POST',
                headers: { 'Content-Type': 'application/json' },
                body: JSON.stringify(autoPostData)
            })
                .then(response => response.json())
                .then(data => {
                    document.getElementById('auto-post-api-result').innerText = JSON.stringify(data, null, 2);
                })
                .catch(error => {
                    document.getElementById('auto-post-api-result').innerText = 'POST API 請求失敗：' + error;
                });
        });
    </script>
</body>
</html>    

