-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
117 lines (117 loc) · 4.91 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="module" src="script.js"></script>
<title>Postman Clone</title>
</head>
<body>
<div class="p-4">
<form action="" data-form>
<div class="input-group mb-4">
<select name="" class="form-select flex-grow-0 w-auto" data-method>
<option value="GET" selected>GET</option>
<option value="POST">POST</option>
<option value="PUT">PUT</option>
<option value="PATCH">PATCH</option>
<option value="DELETE">DELETE</option>
</select>
<input data-url type="url" placeholder="https://example.com" class="form-control" required />
<button type="submit" class="btn btn-primary">Send</button>
</div>
<ul class="nav nav-tabs">
<li class="nav-item">
<button
class="nav-link active"
id="query-params-tab"
data-bs-toggle="tab"
data-bs-target="#query-params"
type="button"
>Query Params</button>
</li>
<li class="nav-item">
<button
class="nav-link"
id="request-headers-tab"
data-bs-toggle="tab"
data-bs-target="#request-headers"
type="button"
>Headers</button>
</li>
<li class="nav-item">
<button
class="nav-link"
id="json-tab"
data-bs-toggle="tab"
data-bs-target="#json"
type="button"
>JSON</button>
</li>
</ul>
<div class="tab-content p-3 border-top-0 border">
<div class="tab-pane fade show active" id="query-params">
<div data-query-params></div>
<button data-add-query-param-btn class="mt-2 btn btn-outline-success" type="button">Add</button>
</div>
<div class="tab-pane fade" id="request-headers">
<div data-request-headers></div>
<button data-add-request-header-btn class="mt-2 btn btn-outline-success" type="button">Add</button>
</div>
<div class="tab-pane fade" id="json">
<div data-json-request-body class="overflow-auto" style="max-height: 200px;"></div>
</div>
</div>
</form>
<div class="mt-5 d-none" data-response-section>
<h3>Repsonse</h3>
<div class="d-flex my-2">
<div class="me-3">
Status: <span data-status></span>
</div>
<div class="me-3">
Time: <span data-time></span>ms
</div>
<div class="me-3">
Size: <span data-size></span>
</div>
</div>
<ul class="nav nav-tabs">
<li class="nav-item">
<button
class="nav-link active"
id="body-tab"
data-bs-toggle="tab"
data-bs-target="#body"
type="button"
>Body</button>
</li>
<li class="nav-item">
<button
class="nav-link"
id="response-headers-tab"
data-bs-toggle="tab"
data-bs-target="#response-headers"
type="button"
>Headers</button>
</li>
</ul>
<div class="tab-content p-3 border-top-0 border">
<div class="tab-pane fade show active" id="body">
<div data-json-response-body class="overflow-auto" style="max-height: 200px;"></div>
</div>
<div class="tab-pane fade" id="response-headers">
<div style="display: grid; grid-template-columns: auto 1fr; gap:.5rem 2rem;" data-response-headers></div>
</div>
</div>
</div>
</div>
<template data-key-value-template>
<div class="input-group my-2" data-key-value-pair>
<input type="text" data-key class="form-control" placeholder="Key" />
<input type="text" data-value class="form-control" placeholder="Value" />
<button type="button" data-remove-btn class="btn btn-outline-danger">Remove</button>
</div>
</template>
</body>
</html>