-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (52 loc) · 1.68 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>HTTPost - API Tester</title>
<link rel="stylesheet" href="/static/css/style.css" />
<link rel="stylesheet" href="/static/css/json.css" />
</head>
<body>
<div class="container">
<div class="header">
<h1>HTTPost</h1>
<p class="subtitle" style="margin-bottom: 5px">
Your Lightweight API Tester
</p>
<label class="switch">
<input
type="checkbox"
id="darkModeToggle"
onclick="toggleDarkMode()"
/>
<span class="slider"></span>
</label>
<p class="dark-mode-label">Dark Mode</p>
</div>
<div class="request-section">
<h2>API Request</h2>
<select id="method">
<option value="GET">GET</option>
<option value="POST">POST</option>
<option value="PUT">PUT</option>
<option value="DELETE">DELETE</option>
</select>
<input type="text" id="url" placeholder="Enter URL" />
<textarea id="body" placeholder="Request body (if needed)"></textarea>
<input
type="text"
id="headers"
placeholder="Headers (comma-separated: key1:value1, key2:value2)"
/>
<button onclick="makeRequest()">Send Request</button>
</div>
<div class="response-section">
<h2>API Response</h2>
<pre id="response" class="json-output"></pre>
</div>
</div>
<script src="/static/script/formatter.js"></script>
<script src="/static/script/engine.js"></script>
</body>
</html>